Jun

完成

Showing 110 changed files with 1666 additions and 614 deletions
......@@ -81,5 +81,6 @@
<modules>
<module>portal.base</module>
<module>portal.query</module>
<module>portal.web</module>
</modules>
</project>
\ No newline at end of file
......
dataSource.driverClassName=com.mysql.jdbc.Driver
dataSource.url=jdbc:mysql://192.168.14.237/portal1?allowMultiQueries=true
dataSource.username=runsa
dataSource.password=Runsa&237
dataSource.url=jdbc:mysql://58.216.158.26:13306/portal?allowMultiQueries=true
dataSource.username=root
dataSource.password=ROOTROOT
#dataSource.url=jdbc:mysql://tel.runsa.cn:62370/portal1?allowMultiQueries=true
#dataSource.username=runsa
#dataSource.password=Runsa&237
#dataSource.url=jdbc:mysql://tel.runsa.cn:62370/portal?allowMultiQueries=true
#dataSource.username=runsa
#dataSource.password=runsacrm2016
#dataSource.url=jdbc:mysql://139.196.77.11:63406/portal0731?allowMultiQueries=true
#dataSource.username=crm
#dataSource.password=Runsa&2016
#dataSource.url=jdbc:mysql://satcrmdb.mysqldb.chinacloudapi.cn:3306/portal?allowMultiQueries=true
#dataSource.username=satcrmdb%satadmin
#dataSource.password=satadmin@2016
#dataSource.url=jdbc:mysql://satcrmdbtest.mysqldb.chinacloudapi.cn:3306/portal?allowMultiQueries=true
#dataSource.username=satcrmdbtest%satadmin
#dataSource.password=sat@2016
dataSource.filters=stat
dataSource.maxActive=20
dataSource.initialSize=5
......@@ -20,9 +35,14 @@ mns.accountendpoint=http://1379859149635672.mns.cn-hangzhou.aliyuncs.com/
mns.accesskeyid=gHCcZmqW2qd0CfPd
mns.accesskeysecret=TcGMbmalY6oubWpDvJIaOmOME9Bwd3
redis.host=192.168.14.237
redis.port=6379
redis.host=58.216.158.26
#redis.host=114.112.29.180
redis.port=16379
redis.password=
#redis.host=satcrmredistest.redis.cache.chinacloudapi.cn
#redis.port=6379
#redis.password=fRseoZB7JnbBKmOgRBPZOC+DvNVGpJr8m7h2PkIL8+g=
redis.expire=1800
auto.coupon.rule.default.org=1
......@@ -42,4 +62,5 @@ weixin.message.js=http://tel.runsa.cn:8083/mpplat-rest/static/js/mpplat.js
crm.msgTimeOut=3600
runsa.portal.path.temp=res:temp
runsa.portal.path.template=res:template
\ No newline at end of file
......
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored ="false" %>
<script>
function goPage(i){
switch (i){
case 1: // 审请发行券
showTabUtils({text:'券发行',url:'./coupon/coupons?flagCM=1'}, true, function(){});
break;
case 2: // 审批发行券
showTabUtils({text:'券发行',url:'./coupon/coupons?flagCM=2'}, true, function(){});
break;
case 3: // 查看发行券
showTabUtils({text:'券发行',url:'./coupon/coupons?flagCM=3'}, true, function(){});
break;
case 4: // 审请雇员发券额度
showTabUtils({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=4'}, true, function(){});
break;
case 5: // 审批雇员发券额度
showTabUtils({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=5'}, true, function(){});
break;
case 6: // 查看雇员发券额度
showTabUtils({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=6'}, true, function(){});
break;
default: // 查看顾客券账户
showTabUtils({text:'顾客券账户',url:'./coupon/custCouponAcount'}, true, function(){});
break;
}
}
</script>
<div class="crm-coupon-detail">
<div class="north" data-options="region:'north',border:false">
<div class="rs-navi">
......@@ -36,14 +9,15 @@ function goPage(i){
<div align="center">
<img style="margin-top: 50px;" src ="./css/default/images/portal/couponMgr.png" alt="couponMgr" usemap ="#couponMgrMap" />
<map id="couponMgrMap" name="couponMgrMap">
<area shape="rect" coords="24,1,110,74" href="javascript:goPage(1);" />
<area shape="rect" coords="258,1,346,75" href="javascript:goPage(2);" />
<area shape="rect" coords="486,1,570,76" href="javascript:goPage(3);" />
<area shape="rect" coords="1,114,142,198" href="javascript:goPage(4);" />
<area shape="rect" coords="228,113,372,197" href="javascript:goPage(5);" />
<area shape="rect" coords="452,113,592,197" href="javascript:goPage(6);" />
<area shape="rect" coords="6,247,134,319" href="javascript:goPage(7);" />
<area shape="rect" coords="24,1,110,74" href="javascript:void(0);" type="1"/>
<area shape="rect" coords="258,1,346,75" href="javascript:void(0);" type="2"/>
<area shape="rect" coords="486,1,570,76" href="javascript:void(0);" type="3"/>
<area shape="rect" coords="1,114,142,198" href="javascript:void(0);" type="4"/>
<area shape="rect" coords="228,113,372,197" href="javascript:void(0);" type="5"/>
<area shape="rect" coords="452,113,592,197" href="javascript:void(0);" type="6"/>
<area shape="rect" coords="6,247,134,319" href="javascript:void(0);" type="7"/>
</map>
</div>
</div>
</div>
<script type="text/javascript">require(["coupons/couponMgr"], function(fn){fn();});</script>
\ No newline at end of file
......
......@@ -79,6 +79,14 @@ define({
discount:'适用现价折数带',
maxdiscount:'最低综合折数限制',
chooseSuitBrand:'选择适用品牌'
},
customerLevel:{
title:'顾客评级',
datagrid_col_rak_index_title:'等级',
datagrid_col_rak_id_title:'代号',
datagrid_col_rak_name_title:'名称',
datagrid_col_rak_desc_title:'描述',
datagrid_col_discount_title:'会员消费优惠折数'
}
},
"en-US": true,
......
......@@ -190,9 +190,11 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi
JSONToCSVConvertor(result.list, fileName, true);
}
}
})
});
},
//通用下载方法
/**
* 通用下载
*/
download:function(filename,path,url){
if(!url){
url='./download';
......@@ -209,12 +211,16 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi
}, 60*10000);
}
},
//excel错误文件下载
downloadErrorExcel:function(fileName,path){
/**
* excel错误文件下载
*/
downloadErrorExcel:function(filename,path){
var url = "./excelImport/downloadError";
this.download(fileName,path,url);
this.download(filename,path,url);
},
//excel模板文件下载
/**
* excel模板文件下载
*/
downloadExcelTemplate:function(filename){
var url = "./excelImport/downloadExcelTemplate";
this.download(filename,null,url);
......@@ -233,7 +239,8 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi
});
}*/
});
return new Base();
var base=new Base();
return base;
function extendJqueryFunction() {
$.appendZero = function (num, n) {
......@@ -597,7 +604,7 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi
prompt: '不限',
searcher: function () {
var index = $(this).searchbox("options").rowIndex;
showCondObject(opts, function (rows) {
base.showCondObject(opts, function (rows) {
var extIds = "";
var name = "";
if (usdType == 1) {
......
......@@ -30,13 +30,17 @@ define({
addByFile:'导入', /*import 在IE浏览器上是关键字,请引用到的地方修改*/
selCustomer:"选择用户",
downloadExcel:"导出模板",
accept:'可用',
finish:'完成',
exportPdf:'导出PDF'
},
confirmDelete:'你确定要删除这条信息吗?',
msgEditTip:'请选择要编辑的数据!',
msgRemoveTip:'请选择要删除的数据!',
msgSaveTitle:'您确定保存?',
msgDefaultTip:'请选择对象!',
msg_title:"系统提示",
msgSelect:'请选择',
onExit:'您确定退出门户吗?',
msgOptTip:'确定进行该操作?',
msgSuccess:'操作成功',
......
define({
root:{
title:'经营渠道',
grid:{
name:'名称',
desc:'描述 ',
brand:'经营品牌',
valid:'可用'
},
check:{
valid:'只有系统管理平台才能编辑渠道信息!'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!company/nls/resource','cls', 'base/index', 'index/index'],function(resource,Class,base,layout){
return function(){
var plId = $.cookie("rs-platform-id");
var body=$(document.body);
var pannel = getSelectedPanel();//初始化面板
var pannel = layout.getSelectedPanel();//初始化面板
var page = pannel.children(".corp-index-page").layout({
fit:true
});//定义面板内div
......@@ -14,44 +13,44 @@ define(function(){
return $('<div></div>').appendTo(center).datagrid({
url:'./query/'+condId+'.json',
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title: resource.company.title,
authz:getAuthzUtils('company'),
title: resource.title,
authz:base.getAuthz('company'),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select select-condition',
code:'view',
handler: function(){
showCondObject(condId,datagridReload);
base.showCondObject(condId,datagridReload);
}
},{
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
code:'edit',
handler: addEvent
},{
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
code:'edit',
handler: editEvent
},{
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
code:'edit',
handler: deleteEvent
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){datagridReload();}
}]
}),
columns:[[
{field:'ck',checkbox:true },
{field:'COCODE',title:resource.company.grid.code, width:80},
{field:'CONAME',title:resource.company.grid.name, width:300},
{field:'BENAME',title:resource.company.grid.bizentity, width:300,formatter:formatText},
{field:'CODESC',title:resource.company.grid.desc, width:300,formatter:formatText},
{field:'VALID',title:resource.company.grid.valid, width:80}
{field:'COCODE',title:resource.grid.code, width:80},
{field:'CONAME',title:resource.grid.name, width:300},
{field:'BENAME',title:resource.grid.bizentity, width:300,formatter:formatText},
{field:'CODESC',title:resource.grid.desc, width:300,formatter:formatText},
{field:'VALID',title:resource.grid.valid, width:80}
]],
onSelect:function(index,row){
if(row.PLID == plId){// 任何平台均只能编辑自身创建的公司
......@@ -74,15 +73,15 @@ define(function(){
}
// 新增页面弹出绑定按钮
function addEvent(){
showTabUtils({text:resource.company.detailsTitle,url:'./company/detailAdd'},datagridReload,true);
layout.showPanel({text:resource.detailsTitle,url:'./company/detailAdd'},datagridReload,true);
}
// 编辑页面弹出绑定按钮
function editEvent(){
var row = grid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
showTabUtils({text:resource.company.detailsTitle,url:"./company/detailEdit?coId="+row.COID}, true, function(){
layout.showPanel({text:resource.detailsTitle,url:"./company/detailEdit?coId="+row.COID}, true, function(){
grid.datagrid("reload");
});
}
......@@ -91,13 +90,13 @@ define(function(){
function deleteEvent(){
var row = grid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
$.post("./company/deleteCompany.json",{coId:row.COID},function(result){
if(responseUtils(result)){
$.messager.alert(resource.msg_title,resource.msgSuccess);
if($.response(result)){
$.messager.alert(base.resource.msg_title,base.resource.msgSuccess);
grid.datagrid("reload");
}
});
......@@ -109,7 +108,7 @@ define(function(){
if(params){
grid.datagrid("reload",params);
}else{
grid.datagrid("reload",getCondObjectValue(condId));
grid.datagrid("reload",base.getCondObjectValue(condId));
}
}
};
......
define({
root:{
title:'公司',
detailsTitle:'公司详情',
grid:{
code:'编号',
name:'名称',
desc:'描述 ',
bizentity:'适用经营主体',
valid:'可用'
},
saveTitle:'是否保存基本资料',
selectMoveRow:'请选择要移动的数据!',
letterOrNumberValid:'只能输入数字、字母或其组合!',
select:'请选择',
country:'国家',
province:'省/市',
city:'市/县',
area:'县/区',
addr:'详细地址',
zipCodeValid:'请输入正确的邮编!',
telphoneValid:'请输入正确的电话!',
phoneValid:'请输入正确的手机!',
saveCompanyInfo:'请先保存公司基本资料',
dept:{
cannotAddNext:'根节点无法插入平级部门!',
cannotDeleteRoot:'根节点无法删除!',
isDelete:'您确定要删除此部门及其下属部门和岗位吗?',
isMove:'您确定要移动此部门及其下属部门吗?',
cannotMoveRoot:'根节点无法移动!',
selectAddRow:'请选择相应部门节点添加',
selectDeleteRow:'请选择相应部门节点删除',
selectMoveRow:'请选择相应部门节点移动'
},
post:{
grid:{
title:'岗位',
code:'编号',
name:'名称'
},
cannotAdd:'根节点无法配置岗位!',
newPost:'新增',
updatePost:'编辑',
removePost:'删除',
moveUpPost:'上移',
moveDownPost:'下移',
selectAddRow:'请选择要添加岗位的部门!',
isDelete:'您确定要删除此岗位吗?'
},
employee:{
grid:{
title:'雇员',
emid:'雇员id',
code:'工号',
name:'姓名',
phone:'手机',
deName:'部门'
}
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) {
return function(){
var panel = layout.getSelectedPanel();
panel.find("area").bind("click",function(){
var type=$(this).attr("type");
switch (type){
case "1": // 审请发行券
layout.showPanel({text:'券发行',url:'./coupon/coupons?flagCM=1'}, true, function(){});
break;
case "2": // 审批发行券
layout.showPanel({text:'券发行',url:'./coupon/coupons?flagCM=2'}, true, function(){});
break;
case "3": // 查看发行券
layout.showPanel({text:'券发行',url:'./coupon/coupons?flagCM=3'}, true, function(){});
break;
case "4": // 审请雇员发券额度
layout.showPanel({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=4'}, true, function(){});
break;
case "5": // 审批雇员发券额度
layout.showPanel({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=5'}, true, function(){});
break;
case "6": // 查看雇员发券额度
layout.showPanel({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=6'}, true, function(){});
break;
default: // 查看顾客券账户
layout.showPanel({text:'顾客券账户',url:'./coupon/custCouponAcount'}, true, function(){});
break;
}
});
}
});
\ No newline at end of file
define(function(){ // 券型总览
define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) {
// 券型总览
return {
init : function(){
var couponQuery = "56bad201-f95d-4f5a-81e5-2cd5e154b7e8"; // 券型总览
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".pl-sys-users").show().layout({fit:true});
var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID
function initCrmCouponDatagrid(){
return panel.find(".crm-coupon-table").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:resource.coupons.summaryDatagrid.title, // 券型总览
title:resource.summaryDatagrid.title, // 券型总览
buttons:[{ // 查询条件
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(couponQuery,datagridReload);
base.showCondObject(couponQuery,datagridReload);
}
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
}
}]
}),
url:"./query/"+couponQuery+".json",
fitColumns:true,
columns:[[
{field:'ck',checkbox:true},
{field:'CPL_ID',title:resource.coupons.summaryDatagrid.cpl_id,width:80,align:'center'}, // 券型编号
{field:'CPL_NAME',title:resource.coupons.summaryDatagrid.cpl_name,width:100,align:'center'}, // 券名称
{field:'CPN_TYPE',title:resource.coupons.summaryDatagrid.cpn_type,width:60,align:'center'}, // 类型
{field:'SHARED',title:resource.coupons.summaryDatagrid.shared,width:60,align:'center'}, // 共享性
{field:'BEBNAME',title:resource.coupons.summaryDatagrid.bebname,width:100,align:'center'}, // 发行主体
{field:'ORNAME',title:resource.coupons.summaryDatagrid.orname,width:100,align:'center'}, // 发行组织
{field:'CHNAME',title:resource.coupons.summaryDatagrid.chname,width:100,align:'center'}, // 发行渠道
{field:'ISU_S_TIME',title:resource.coupons.summaryDatagrid.isu_s_time,width:80,align:'center'}, // 发行起始日
{field:'ISU_E_TIME',title:resource.coupons.summaryDatagrid.isu_e_time,width:80,align:'center'}, // 发行截止日
{field:'USE_S_TIME',title:resource.coupons.summaryDatagrid.use_s_time,width:80,align:'center'}, // 使用起始日
{field:'USE_E_TIME',title:resource.coupons.summaryDatagrid.use_e_time,width:80,align:'center'}, // 使用截止日
{field:'MAX_NUM',title:resource.coupons.summaryDatagrid.max_num,width:80,align:'center'}, // 发行限量
{field:'NOW_NUM',title:resource.coupons.summaryDatagrid.now_num,width:80,align:'center'}, // 发行余量
{field:'VALID_NUM',title:resource.coupons.summaryDatagrid.valid_num,width:80,align:'center'}, // 有效配出额度
{field:'ISSUED_NUM',title:resource.coupons.summaryDatagrid.issued_num,width:80,align:'center'}, // 已发放量
{field:'NOUSE_NUM',title:resource.coupons.summaryDatagrid.nouse_num,width:80,align:'center'}, // 未使用量
{field:'USED_NUM',title:resource.coupons.summaryDatagrid.used_num,width:80,align:'center'}, // 已使用量
{field:'IS_VALID',title:resource.coupons.summaryDatagrid.is_valid,width:80,align:'center'} // 是否过期
{field:'CPL_ID',title:resource.summaryDatagrid.cpl_id,width:80,align:'center'}, // 券型编号
{field:'CPL_NAME',title:resource.summaryDatagrid.cpl_name,width:100,align:'center'}, // 券名称
{field:'CPN_TYPE',title:resource.summaryDatagrid.cpn_type,width:60,align:'center'}, // 类型
{field:'SHARED',title:resource.summaryDatagrid.shared,width:60,align:'center'}, // 共享性
{field:'BEBNAME',title:resource.summaryDatagrid.bebname,width:100,align:'center'}, // 发行主体
{field:'ORNAME',title:resource.summaryDatagrid.orname,width:100,align:'center'}, // 发行组织
{field:'CHNAME',title:resource.summaryDatagrid.chname,width:100,align:'center'}, // 发行渠道
{field:'ISU_S_TIME',title:resource.summaryDatagrid.isu_s_time,width:80,align:'center'}, // 发行起始日
{field:'ISU_E_TIME',title:resource.summaryDatagrid.isu_e_time,width:80,align:'center'}, // 发行截止日
{field:'USE_S_TIME',title:resource.summaryDatagrid.use_s_time,width:80,align:'center'}, // 使用起始日
{field:'USE_E_TIME',title:resource.summaryDatagrid.use_e_time,width:80,align:'center'}, // 使用截止日
{field:'MAX_NUM',title:resource.summaryDatagrid.max_num,width:80,align:'center'}, // 发行限量
{field:'NOW_NUM',title:resource.summaryDatagrid.now_num,width:80,align:'center'}, // 发行余量
{field:'VALID_NUM',title:resource.summaryDatagrid.valid_num,width:80,align:'center'}, // 有效配出额度
{field:'ISSUED_NUM',title:resource.summaryDatagrid.issued_num,width:80,align:'center'}, // 已发放量
{field:'NOUSE_NUM',title:resource.summaryDatagrid.nouse_num,width:80,align:'center'}, // 未使用量
{field:'USED_NUM',title:resource.summaryDatagrid.used_num,width:80,align:'center'}, // 已使用量
{field:'IS_VALID',title:resource.summaryDatagrid.is_valid,width:80,align:'center'} // 是否过期
]]
});
function datagridReload(){
var param =getCondObjectValue(couponQuery);
var param =base.getCondObjectValue(couponQuery);
crmCouponDatagrid.datagrid("reload",param);
}
}
......
define(function(){ // 顾客券账户
define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) {
// 顾客券账户
return {
init : function(){
var couponQuery = "72c917f2-e51b-4227-9138-0d196975a7c3"; // 顾客券账户
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".pl-sys-users").show().layout({fit:true});
var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID
function initCrmCouponDatagrid(){
return panel.find(".crm-coupon-table").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:resource.coupons.couponAcountDatagrid.title, // 券列表
title:resource.couponAcountDatagrid.title, // 券列表
buttons:[{ // 查询条件
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(couponQuery,datagridReload);
base.showCondObject(couponQuery,datagridReload);
}
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
}
}]
}),
url:"./query/"+couponQuery+".json",
fitColumns:true,
columns:[[
{field:'ck',checkbox:true},
{field:'CST_ID',title:resource.coupons.couponAcountDatagrid.CST_ID,width:80,align:'center'}, // 顾客ID
{field:'CPN_ID',title:resource.coupons.couponAcountDatagrid.CPN_ID,width:80,align:'center'}, // 券号
{field:'CPL_ID',title:resource.coupons.couponAcountDatagrid.CPL_ID,width:80,align:'center'}, // 券型号
{field:'CPL_NAME',title:resource.coupons.couponAcountDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称
{field:'CPN_TYPE',title:resource.coupons.couponAcountDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型
{field:'SHARED',title:resource.coupons.couponAcountDatagrid.SHARED,width:60,align:'center'}, // 共享性
{field:'BEBNAME',title:resource.coupons.couponAcountDatagrid.BEBNAME,width:100,align:'center'}, // 发行主体
{field:'ORNAME',title:resource.coupons.couponAcountDatagrid.ORNAME,width:100,align:'center'}, // 发行组织
{field:'CHNAME',title:resource.coupons.couponAcountDatagrid.CHNAME,width:100,align:'center'}, // 发行渠道
{field:'USE_S_TIME',title:resource.coupons.couponAcountDatagrid.USE_S_TIME,width:80,align:'center'}, // 使用起始日
{field:'USE_E_TIME',title:resource.coupons.couponAcountDatagrid.USE_E_TIME,width:80,align:'center'}, // 使用截止日
{field:'RCV_TIME',title:resource.coupons.couponAcountDatagrid.RCV_TIME,width:80,align:'center'}, // 领券日期
{field:'CPN_STAT',title:resource.coupons.couponAcountDatagrid.CPN_STAT,width:60,align:'center'}, // 状态
{field:'USE_TIME',title:resource.coupons.couponAcountDatagrid.USE_TIME,width:80,align:'center'} // 使用日期
{field:'CST_ID',title:resource.couponAcountDatagrid.CST_ID,width:80,align:'center'}, // 顾客ID
{field:'CPN_ID',title:resource.couponAcountDatagrid.CPN_ID,width:80,align:'center'}, // 券号
{field:'CPL_ID',title:resource.couponAcountDatagrid.CPL_ID,width:80,align:'center'}, // 券型号
{field:'CPL_NAME',title:resource.couponAcountDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称
{field:'CPN_TYPE',title:resource.couponAcountDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型
{field:'SHARED',title:resource.couponAcountDatagrid.SHARED,width:60,align:'center'}, // 共享性
{field:'BEBNAME',title:resource.couponAcountDatagrid.BEBNAME,width:100,align:'center'}, // 发行主体
{field:'ORNAME',title:resource.couponAcountDatagrid.ORNAME,width:100,align:'center'}, // 发行组织
{field:'CHNAME',title:resource.couponAcountDatagrid.CHNAME,width:100,align:'center'}, // 发行渠道
{field:'USE_S_TIME',title:resource.couponAcountDatagrid.USE_S_TIME,width:80,align:'center'}, // 使用起始日
{field:'USE_E_TIME',title:resource.couponAcountDatagrid.USE_E_TIME,width:80,align:'center'}, // 使用截止日
{field:'RCV_TIME',title:resource.couponAcountDatagrid.RCV_TIME,width:80,align:'center'}, // 领券日期
{field:'CPN_STAT',title:resource.couponAcountDatagrid.CPN_STAT,width:60,align:'center'}, // 状态
{field:'USE_TIME',title:resource.couponAcountDatagrid.USE_TIME,width:80,align:'center'} // 使用日期
]]
});
function datagridReload(){
var param =getCondObjectValue(couponQuery);
var param =base.getCondObjectValue(couponQuery);
crmCouponDatagrid.datagrid("reload",param);
}
}
......
define(function(){ // 雇员券额度
define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) {
// 雇员券额度
return {
init : function(){
var couponQuery = "17ae6d75-239d-4f1c-9a8c-955a4de83531"; // 雇员券额度
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".pl-sys-users").show().layout({fit:true});
var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID
function initCrmCouponDatagrid(){
return panel.find(".crm-coupon-table").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:resource.coupons.couponQuotaDatagrid.title, // 雇员券额度列表
title:resource.couponQuotaDatagrid.title, // 雇员券额度列表
buttons:[{ // 查询条件
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(couponQuery,datagridReload);
base.showCondObject(couponQuery,datagridReload);
}
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
}
}]
}),
url:"./query/"+couponQuery+".json",
fitColumns:true,
columns:[[
{field:'ck',checkbox:true},
{field:'EMID',title:resource.coupons.couponQuotaDatagrid.EMID,width:80,align:'center'}, // 雇员ID
{field:'EMCODE',title:resource.coupons.couponQuotaDatagrid.EMCODE,width:100,align:'center'}, // 工号
{field:'EMNAME',title:resource.coupons.couponQuotaDatagrid.EMNAME,width:60,align:'center'}, // 姓名
{field:'CONAME',title:resource.coupons.couponQuotaDatagrid.CONAME,width:220,align:'center'}, // 公司
{field:'DENAME',title:resource.coupons.couponQuotaDatagrid.DENAME,width:120,align:'center'}, // 部门
{field:'PONAME',title:resource.coupons.couponQuotaDatagrid.PONAME,width:120,align:'center'}, // 岗位
{field:'CPL_ID',title:resource.coupons.couponQuotaDatagrid.CPL_ID,width:60,align:'center'}, // 券型号
{field:'CPL_NAME',title:resource.coupons.couponQuotaDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称
{field:'NOW_NUM',title:resource.coupons.couponQuotaDatagrid.NOW_NUM,width:80,align:'center'}, // 额度余量
{field:'ISU_S_TIME',title:resource.coupons.couponQuotaDatagrid.ISU_S_TIME,width:90,align:'center'}, // 有效起始日
{field:'ISU_E_TIME',title:resource.coupons.couponQuotaDatagrid.ISU_E_TIME,width:90,align:'center'}, // 有效截止日
{field:'TOTAL_NUM',title:resource.coupons.couponQuotaDatagrid.TOTAL_NUM,width:80,align:'center'}, // 获得额度
{field:'ISU_NUM',title:resource.coupons.couponQuotaDatagrid.ISU_NUM,width:80,align:'center'}, // 已发放量 TODO 计算结果不正确
{field:'TRANSFER_NUM',title:resource.coupons.couponQuotaDatagrid.TRANSFER_NUM,width:80,align:'center'}, // 已转让量 TODO 暂未实现
{field:'CPN_TYPE',title:resource.coupons.couponQuotaDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型
{field:'SHARED',title:resource.coupons.couponQuotaDatagrid.SHARED,width:60,align:'center'}, // 共享性
{field:'BEBNAME',title:resource.coupons.couponQuotaDatagrid.BEBNAME,width:80,align:'center'}, // 发行主体
{field:'ORNAME',title:resource.coupons.couponQuotaDatagrid.ORNAME,width:80,align:'center'}, // 发行组织
{field:'CHNAME',title:resource.coupons.couponQuotaDatagrid.CHNAME,width:80,align:'center'} // 发行渠道
{field:'EMID',title:resource.couponQuotaDatagrid.EMID,width:80,align:'center'}, // 雇员ID
{field:'EMCODE',title:resource.couponQuotaDatagrid.EMCODE,width:100,align:'center'}, // 工号
{field:'EMNAME',title:resource.couponQuotaDatagrid.EMNAME,width:60,align:'center'}, // 姓名
{field:'CONAME',title:resource.couponQuotaDatagrid.CONAME,width:220,align:'center'}, // 公司
{field:'DENAME',title:resource.couponQuotaDatagrid.DENAME,width:120,align:'center'}, // 部门
{field:'PONAME',title:resource.couponQuotaDatagrid.PONAME,width:120,align:'center'}, // 岗位
{field:'CPL_ID',title:resource.couponQuotaDatagrid.CPL_ID,width:60,align:'center'}, // 券型号
{field:'CPL_NAME',title:resource.couponQuotaDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称
{field:'NOW_NUM',title:resource.couponQuotaDatagrid.NOW_NUM,width:80,align:'center'}, // 额度余量
{field:'ISU_S_TIME',title:resource.couponQuotaDatagrid.ISU_S_TIME,width:90,align:'center'}, // 有效起始日
{field:'ISU_E_TIME',title:resource.couponQuotaDatagrid.ISU_E_TIME,width:90,align:'center'}, // 有效截止日
{field:'TOTAL_NUM',title:resource.couponQuotaDatagrid.TOTAL_NUM,width:80,align:'center'}, // 获得额度
{field:'ISU_NUM',title:resource.couponQuotaDatagrid.ISU_NUM,width:80,align:'center'}, // 已发放量 TODO 计算结果不正确
{field:'TRANSFER_NUM',title:resource.couponQuotaDatagrid.TRANSFER_NUM,width:80,align:'center'}, // 已转让量 TODO 暂未实现
{field:'CPN_TYPE',title:resource.couponQuotaDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型
{field:'SHARED',title:resource.couponQuotaDatagrid.SHARED,width:60,align:'center'}, // 共享性
{field:'BEBNAME',title:resource.couponQuotaDatagrid.BEBNAME,width:80,align:'center'}, // 发行主体
{field:'ORNAME',title:resource.couponQuotaDatagrid.ORNAME,width:80,align:'center'}, // 发行组织
{field:'CHNAME',title:resource.couponQuotaDatagrid.CHNAME,width:80,align:'center'} // 发行渠道
]]
});
function datagridReload(){
var param =getCondObjectValue(couponQuery);
var param =base.getCondObjectValue(couponQuery);
crmCouponDatagrid.datagrid("reload",param);
}
}
......
define({
root:{
name:'选择新建券的类型',
couponsdetail:'券详情',
addDialog:{
title:'选择新建券的类型'
},
btnTitle:{
amountBtn:'金额券',
discountBtn:'折扣券',
giftBtn:'礼品券',
pricingBtn:'定价券',
freeShippingBtn:'包邮券'
},
noLmt:'不限',
approval:{
isuETimeOvertimeTip:'发行截止日已过期, 不能通过审核',
issueQuotaOverFlowTip:'发放额度超出上限, 不能通过审核',
issueQuotaEmptyTip:'发放额度为空, 不能通过审核',
state0:'创建中',
state1:'待审批',
state2:'已核准',
state3:'已驳回'
},
couponDatagrid:{ // 券发行
title:'券型列表',
cpl_id:'券型编号',
cpl_name:'券名称',
cpl_desc:'描述',
cpn_type:'类型',
shared:'共享性',
bebname:'发行主体',
orname:'发行组织',
chname:'发行渠道',
max_num:'发行限量',
isu_s_time:'发行起始日',
isu_e_time:'发行截止日',
use_s_time:'使用起始日',
use_e_time:'使用截止日',
emname:'创建人',
rec_time:'创建时间',
is_available:'可用',
cpl_stat:'审批状态',
authname:'审批人',
authtime:'审批时间'
},
summaryDatagrid:{ // 券型总览
title:'券型总览',
cpl_id:'券型编号',
cpl_name:'券名称',
cpl_desc:'描述',
cpn_type:'类型',
shared:'共享性',
bebname:'发行主体',
orname:'发行组织',
chname:'发行渠道',
max_num:'发行限量',
isu_s_time:'发行起始日',
isu_e_time:'发行截止日',
use_s_time:'使用起始日',
use_e_time:'使用截止日',
max_num:'发行限量',
now_num:'发行余量',
valid_num:'有效配出额度',
issued_num:'已发放量',
nouse_num:'未使用量',
used_num:'已使用量',
is_valid:'是否过期'
},
couponAcountDatagrid:{ // 顾客券账户
title:'券列表',
CST_ID:'顾客ID',
CPN_ID:'券号',
CPL_ID:'券型号',
CPL_NAME:'券名称',
CPN_TYPE:'类型',
SHARED:'共享性',
BEBNAME:'发行主体',
ORNAME:'发行组织',
CHNAME:'发行渠道',
USE_S_TIME:'使用起始日',
USE_E_TIME:'使用截止日',
RCV_TIME:'领券日期',
CPN_STAT:'状态',
USE_TIME:'使用日期'
},
couponQuotaDatagrid:{ // 雇员券额度
title:'雇员券额度列表',
EMID:'雇员ID',
EMCODE:'工号',
EMNAME:'姓名',
CONAME:'公司',
DENAME:'部门',
PONAME:'岗位',
CPL_ID:'券型号',
CPL_NAME:'券名称',
NOW_NUM:'额度余量',
ISU_S_TIME:'有效起始日',
ISU_E_TIME:'有效截止日',
TOTAL_NUM:'获得额度',
ISU_NUM:'已发放量',
TRANSFER_NUM:'已转让量',
CPN_TYPE:'类型',
SHARED:'共享性',
BEBNAME:'发行主体',
ORNAME:'发行组织',
CHNAME:'发行渠道'
},
issueCouponQuotaDatagrid:{ // 发券额度
title:'发券额度列表',
DOC_CODE:'单据编号',
CPL_ID:'券型编号',
CPL_NAME:'券名称',
CPN_TYPE:'类型',
CNT:'发放人数',
TOTAL_NUM:'发放额度',
BEBNAME:'发行主体',
ORNAME:'发行组织',
CHNAME:'发行渠道',
EMNAME:'申请发放人',
REC_TIME:'申请日期',
ENABLE:'可用',
GRT_STAT:'审批状态'
},
grantEmployeeDatagrid:{ // 发放雇员
title:'发放雇员列表',
EMID:'单据编号',
EMCODE:'券型编号',
EMNAME:'券名称',
CONAME:'类型',
DENAME:'发放人数',
PONAME:'发放额度',
THIS_NUM:'发行主体'
},
Y:'是',
N:'否',
validateMsg:{
chkNumber:'请输入有效数字',
chkDiscount:'请输入1到100区间的整数',
chkIsuSTime:'发行起始日不能早于今天',
chkUseSTime:'使用起始日不能早于发行起始日',
chkIsuETime:'发行截止日不能早于发行起始日',
chkUseETime:'使用截止日不能早于使用起始日',
chkUseETimeVsIsuETime:'使用截止日不能早于发行截止日',
chkDate:'请输入正确的日期',
chkIsBlank:'请输入有效内容',
chkGiftIsRepeat:'礼品不能重复',
chkMaxNumber:'已超出可发放额度'
},
Msg:{
cplIsExist:'券型编号已存在',
msgSaveSuccess:'保存成功',
msgUpdateSuccess:'修改成功',
msgResult:'结果共',
msgItem:'项: ',
msgMaxNumVsTotalNum:'发行限量不得小于已经发放的数量',
msgSaveCoupon:'请先保存优惠券',
msgUseETimeExpire:'券使用截止日已过期, 不能继续执行',
msgIsuETimeExpire:'券发行截止日已过期, 不能继续执行',
msgTotal:'合计',
msgSaveIssueCouponQuotaDetail:'请先保存发券额度单',
msgAddEmployeeFail:'本次发放额度将超出可发放额度, 添加雇员失败',
msgEditEmployeeIssueQuota:'编辑雇员发放额度',
msgValidQuota:'本次发放额度将超出可发放额度, 请输入有效额度'
},
tabText:{
couponTxt:'券发行',
issueCouponQuotaDetailTxt:'发券额度单',
employeeIssueCouponQuotaTxt:'雇员发券额度'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(["echarts"], function(){
define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index','echarts'], function (resource, Class, moment, base, layout){
return {
init : function(){
var actid = 1;
var customer_datagrid;
var custQuery = 'ea9fc1d8-05b6-432f-a72f-a760f351bc7d';
var pannel = getSelectedPanel(); // 初始化面板
var pannel = layout.getSelectedPanel(); // 初始化面板
var page = pannel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div
var window = initWindow(); // 初始化添加页面
function initCustomerTypeChart(){
var option = {
title:{
text:resource.customers.custTypeText,
text:resource.custTypeText,
textStyle: {
fontSize: 18,
fontWeight: 'normal',
......@@ -50,7 +50,7 @@ define(["echarts"], function(){
function initBornSegmentChart(){
var option = {
title:{
text:resource.customers.bornSegmentText,
text:resource.bornSegmentText,
textStyle: {
fontSize: 18,
fontWeight: 'normal',
......@@ -89,7 +89,7 @@ define(["echarts"], function(){
function initNewCustomersChart(){
var option = {
title:{
text:resource.customers.newCustText,
text:resource.newCustText,
textStyle: {
fontSize: 18,
fontWeight: 'normal',
......@@ -120,7 +120,7 @@ define(["echarts"], function(){
],
yAxis : [
{
name:resource.customers.newCust_yAxis_name,
name:resource.newCust_yAxis_name,
nameTextStyle:{
color:'#595959'
},
......@@ -129,11 +129,11 @@ define(["echarts"], function(){
],
series : [
{
name:resource.customers.newCust_series_name_0,
name:resource.newCust_series_name_0,
type:'bar'
},
{
name:resource.customers.newCust_series_name_1,
name:resource.newCust_series_name_1,
type:'bar'
}
]
......@@ -158,39 +158,39 @@ define(["echarts"], function(){
// 初始化表格
function initDatagrid(){
return page.layout("panel","center").children(".crm-customers-table").datagrid({
title:resource.customers.datagrid_title,
title:resource.datagrid_title,
url:"./query/"+custQuery+".json",
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select',
handler: function(){
showCondObject(custQuery, datagridReload);
base.showCondObject(custQuery, datagridReload);
}
}]
}),
fitColumns:true,//使列自动展开/收缩到合适的DataGrid宽度
columns:[[
{field:'ck',checkbox:true },
{field:'CST_ID',title:resource.customers.datagrid_col_cst_id_title, width:60, align:"center"},
{field:'CST_TYPE',title:resource.customers.datagrid_col_cst_type_title, width:60, align:"center",
{field:'CST_ID',title:resource.datagrid_col_cst_id_title, width:60, align:"center"},
{field:'CST_TYPE',title:resource.datagrid_col_cst_type_title, width:60, align:"center",
formatter: function(value,row,index){
return value>0?resource.customers.newCust_series_name_0:resource.customers.newCust_series_name_1;
return value>0?resource.newCust_series_name_0:resource.customers.newCust_series_name_1;
}
},
{field:'CST_NAME',title:resource.customers.datagrid_col_cst_name_title, width:80, align:"center"},
{field:'NICK_NAME',title:resource.customers.datagrid_col_nick_name_title, width:80, align:"center"},
{field:'PHONE',title:resource.customers.datagrid_col_phone_title, width:60, align:"center"},
{field:'OPEN_ID',title:resource.customers.datagrid_col_open_id_title, width:150, align:"center"},
{field:'EMAIL',title:resource.customers.datagrid_col_email_title, width:100, align:"center"},
{field:'CST_NAME',title:resource.datagrid_col_cst_name_title, width:80, align:"center"},
{field:'NICK_NAME',title:resource.datagrid_col_nick_name_title, width:80, align:"center"},
{field:'PHONE',title:resource.datagrid_col_phone_title, width:60, align:"center"},
{field:'OPEN_ID',title:resource.datagrid_col_open_id_title, width:150, align:"center"},
{field:'EMAIL',title:resource.datagrid_col_email_title, width:100, align:"center"},
/*{field:'VERIFY',title:'身份认证', width:60, align:"center",
formatter: function(value,row,index){
return value>0?'是':'否';
}
},*/
{field:'REG_TIME',title:resource.customers.datagrid_col_reg_time_title, width:60, align:"center",
{field:'REG_TIME',title:resource.datagrid_col_reg_time_title, width:60, align:"center",
formatter: function(value,row,index){
return value?Date.parseDate(value).format("yyyy-MM-dd"):null;
return value?moment(value).format("YYYY-MM-DD"):null;
}
}/*,
{field:'C_AUTH_DATE',title:'认证日期', width:60, align:"center"}*/
......@@ -202,7 +202,7 @@ define(["echarts"], function(){
if(params){
customer_datagrid.datagrid("reload",params);
}else{
customer_datagrid.datagrid("reload",getCondObjectValue(custQuery));
customer_datagrid.datagrid("reload",base.getCondObjectValue(custQuery));
}
}
......@@ -233,7 +233,7 @@ define(["echarts"], function(){
});
if(data.length == 1){
tempWin.dialog({
title:resource.customers.select_act_dialog_title,
title:resource.select_act_dialog_title,
width: 600,
height: 'auto',
closed: true,
......@@ -249,7 +249,7 @@ define(["echarts"], function(){
return false;
}else{
tempWin.dialog({
title:resource.customers.select_act_dialog_title,
title:resource.select_act_dialog_title,
width: 600,
height: 'auto',
closed: false,
......
define(function(){
define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(actId){
var custQuery = 'ea9fc1d8-05b6-432f-a72f-a760f351bc7d';
var actQuery = '5aecc71f-e3a6-4b5f-a60a-b1eaaf8cc9e2';
var panel = getSelectedPanel(); // 初始化面板
var panel = layout.getSelectedPanel(); // 初始化面板
var page = panel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div
var datagrid=initDatagrid(); // 初始化调整datagrid
......@@ -11,7 +11,7 @@ define(function(){
getCrmAccountSet();
function reload(param){
var param =getCondObjectValue(custQuery);
var param =base.getCondObjectValue(custQuery);
datagrid.datagrid("reload",param);
}
......@@ -20,16 +20,16 @@ define(function(){
return panel.find(".crm-customers-table").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:'顾客360列表',
authz:getAuthzUtils('customers'),
authz:base.getAuthz('customers'),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select',
handler: function(){
showCondObject(custQuery, reload);
base.showCondObject(custQuery, reload);
}
},{
code:'edit',
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
handler:editCustomer
}],
......@@ -40,39 +40,41 @@ define(function(){
// handler:saveExcel
// },
{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
}
}]
}),
url:"./query/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val(),
fitColumns:true, // 使列自动展开/收缩到合适的DataGrid宽度
columns:[[
{field:'ck',checkbox:true },
{field:'CST_ID',title:resource.customers.datagrid_col_cst_id_title, width:60, align:"center"},
{field:'CST_TYPE',title:resource.customers.datagrid_col_cst_type_title, width:60, align:"center",
{field:'CST_ID',title:resource.datagrid_col_cst_id_title, width:60, align:"center"},
{field:'CST_TYPE',title:resource.datagrid_col_cst_type_title, width:60, align:"center",
formatter: function(value,row,index){
return value;
}
},
{field:'CST_NAME',title:resource.customers.datagrid_col_cst_name_title, width:80, align:"center"},
{field:'CST_NAME',title:resource.datagrid_col_cst_name_title, width:80, align:"center"},
// {field:'NICK_NAME',title:resource.customers.datagrid_col_nick_name_title, width:80, align:"center"},
{field:'PHONE',title:resource.customers.datagrid_col_phone_title, width:60, align:"center"},
{field:'PHONE',title:resource.datagrid_col_phone_title, width:60, align:"center"},
// {field:'OPEN_ID',title:resource.customers.datagrid_col_open_id_title, width:150, align:"center"},
{field:'EMAIL',title:resource.customers.datagrid_col_email_title, width:100, align:"center"},
{field:'EMAIL',title:resource.datagrid_col_email_title, width:100, align:"center"},
/*{field:'VERIFY',title:'身份认证', width:60, align:"center",
formatter: function(value,row,index){
return value>0?'是':'否';
}
},*/
{field:'REG_TIME',title:resource.customers.datagrid_col_reg_time_title, width:60, align:"center",
{field:'REG_TIME',title:resource.datagrid_col_reg_time_title, width:60, align:"center",
formatter: function(value,row,index){
return value?Date.parseDate(value).format("yyyy-MM-dd"):null;
return value?moment(value).format("YYYY-MM-DD"):null;
}
},
{field:'REC_TIME',title:resource.customers.datagrid_col_rec_time_title, width:60, align:"center",
{field:'REC_TIME',title:resource.datagrid_col_rec_time_title, width:60, align:"center",
formatter: function(value,row,index){
return value?Date.parseDate(value).format("yyyy-MM-dd"):null;
return value?moment(value).format("YYYY-MM-DD"):null;
}
}
/*,
......@@ -89,14 +91,14 @@ define(function(){
function saveExcel() {
// 导出Excel文件
var url="./query/result/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val()+"&page=-1";
var param =getCondObjectValue(custQuery);
var param =base.getCondObjectValue(custQuery);
exportAllData(url,param,"顾客360列表");
}
// 选择CRM账套
function getCrmAccountSet(){
panel.find(".actNamePic").bind('click',function(){
showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){
base.showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){
panel.find(".actId").val(row.ACT_ID);
panel.find(".actName").val(row.ACT_NAME);
datagridReload();
......@@ -109,10 +111,10 @@ define(function(){
function editCustomer(){
var row = datagrid.datagrid("getSelected");
if(row==null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
url = "./customer/detail?cstId="+row.CST_ID;
showTabUtils({text:"顾客详情",url:url}, true, function(){});
layout.showPanel({text:"顾客详情",url:url}, true, function(){});
}
}
}
......
define({
root:{
custTypeText:'顾客类型',
bornSegmentText:'出身年代',
newCustText:'新增顾客',
newCust_yAxis_name:'顾客数',
newCust_series_name_0:'会员',
newCust_series_name_1:'粉丝',
datagrid_title:'顾客',
datagrid_col_cst_id_title:'顾客ID',
datagrid_col_cst_type_title:'顾客类型',
datagrid_col_cst_name_title:'姓名',
datagrid_col_nick_name_title:'昵称',
datagrid_col_phone_title:'手机',
datagrid_col_open_id_title:'OPEN ID',
datagrid_col_email_title:'邮箱',
datagrid_col_reg_time_title:'入会日期',
datagrid_col_rec_time_title:'创建日期',
select_act_dialog_title:'选择CRM账套',
target:{
title:{
name:'顾客招募列表',
detail:'顾客招募详情',
set:'店铺招募目标设置',
notNull:'计划招募人数不能为空',
setSite:'设置网点',
chooseCrm:'请先选择CRM账套!',
chooseSite:'选择网点',
siteIs:'网点编号为',
targetRepeat:'的招募目标重复',
targetNotnull:'的招募目标不能为空',
chooseSiteFir:'请先选择网点',
success:'保存成功'
},
grid:{
siid:'网点id',
sicode:'网点编号',
siname:'网点名称',
orname:'上级管理组织',
actname:'CRM账套',
yeah:'目标年份',
month:'目标月份',
targetrecruit:'计划招募会员'
}
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
var LABEL_HTML = '<label></label>';
var EM_HTML = '<em class="dialog-pad"></em>';
var INPUT_HTML = '<input class="inp_reg">';
......
define(["uploadify"],function(){
define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index','uploadify'], function (resource, Class, moment, base, layout){
return {
init : function(actId,sessionId){
var custQuery = '90b85e3c-0b33-4cfd-96b8-ef629c5dd5d3';
var actQuery = '5aecc71f-e3a6-4b5f-a60a-b1eaaf8cc9e2';
var panel = getSelectedPanel(); // 初始化面板
var panel = layout.getSelectedPanel(); // 初始化面板
var page = panel.children(".crm-customers-target").show().layout({fit:true}); // 定义面板内div
var dataGrid=initDatagrid(); //初始化调整datagrid
//datagrid刷新
function reload(param){
var param =getCondObjectValue(custQuery);
var param =base.getCondObjectValue(custQuery);
dataGrid.datagrid("reload",param);
}
//form验证:
initValidateboxForm();
// initValidateboxForm();
initUploadify();
// 初始化表格
......@@ -21,44 +21,46 @@ define(["uploadify"],function(){
return page.layout("panel","center").children(".crm-customers-table").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:resource.target.title.name,
authz:getAuthzUtils('target'),
authz:base.getAuthz('target'),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select',
handler:function(){
showCondObject(custQuery, reload);
base.showCondObject(custQuery, reload);
}
},{
code:'add',
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
handler:newlBuild
},{
code:'edit',
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
handler:editCustomer
},{
code:'delete',
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
handler:deleteSite
}],
tools:[{ // 导出模板
code:'edit',
text:resource.btn.downloadExcel,
text:base.resource.btn.downloadExcel,
iconCls:'btn-down',
handler:function(){
var fileName="customerTargetTemplate.xlsx";
downloadExcel(fileName);
base.downloadExcelTemplate(fileName);
}
},{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
}
},{ // 导入
code:'edit',
text:resource.btn.addByFile,
text:base.resource.btn.addByFile,
id:'btn-customertarget-import',
iconCls:'btn-down'
}]
......@@ -86,24 +88,24 @@ define(["uploadify"],function(){
function saveExcel() {
// 导出Excel文件
var url="./query/result/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val()+"&page=-1";
var param =getCondObjectValue(custQuery);
var param =base.getCondObjectValue(custQuery);
exportAllData(url,param,resource.target.title.name);
}
// 新建
function newlBuild() {
showTabUtils({text:resource.target.title.detail,url:"./customer/targetdetails"}, true, function(){});
layout.showPanel({text:resource.target.title.detail,url:"./customer/targetdetails"}, true, function(){});
}
// 编辑
function editCustomer(){
var row = dataGrid.datagrid("getSelected");
if(row==null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
$.post("./customer/selectbyid.json",{id:row.TARGET_ID},function(result){
console.log(result);
if(responseUtils(result)){
// console.log(result);
if($.response(result)){
editSiteTarget(row.TARGET_ID,row.SICODE+"_"+row.SINAME,row.ACT_NAME,result.value.month,result.value.recruit);
dataGrid.datagrid("reload");
$('.edit_site').find('.recruit').textbox({
......@@ -120,12 +122,12 @@ define(["uploadify"],function(){
var row = dataGrid.datagrid("getSelected");
console.log(row)
if(row==null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
$.post("./customer/deleteTarget.json",{id:row.TARGET_ID},function(result){
if(responseUtils(result)){
if($.response(result)){
dataGrid.datagrid("reload");
}
});
......@@ -151,13 +153,13 @@ define(["uploadify"],function(){
width:'500',
height:'300',
buttons:[{
text: resource.btn.save,
text: base.resource.btn.save,
handler:function() {
if(! edit_site.find('.setSiteTarget').form("validate")) {//检查页面必输入项
return false;
}
if(!edit_site.find('.recruit').val()){
$.messager.alert(resource.msg_title,resource.target.title.notNull)
$.messager.alert(base.resource.msg_title,resource.target.title.notNull)
return false;
}
var params = {
......@@ -167,15 +169,15 @@ define(["uploadify"],function(){
recruit:edit_site.find('.recruit').val()
}
$.JSON("./customer/updateTarget.json",params,function(result){
if(responseUtils(result)){
if($.response(result)){
dataGrid.datagrid("reload");
edit_site.dialog("close");
console.log(result);
// console.log(result);
}
});
}
}, {
text: resource.btn.cancel,
text: base.resource.btn.cancel,
handler:function() {
edit_site.dialog("close");
}
......@@ -215,7 +217,7 @@ define(["uploadify"],function(){
//输入长度
function maxLength(){
maxlengthUtils($('.edit_site').find('.recruit'),5);
base.maxlength($('.edit_site').find('.recruit'),5);
}
/**
......@@ -244,7 +246,7 @@ define(["uploadify"],function(){
$("#btn-customertarget-import-button").linkbutton({ // 导入
iconCls: 'btn-up',
text:resource.btn.addByFile
text:base.resource.btn.addByFile
});
}
}
......
define(function(){
define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(actId){
var panel = getSelectedPanel(); // 初始化面板
var panel = layout.getSelectedPanel(); // 初始化面板
var page = panel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div
var dataGrid=initDatagrid(); //初始化调整datagrid
......@@ -12,7 +12,7 @@ define(function(){
title:resource.target.title.name,
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
buttons:[{
text:resource.btn.save,
text:base.resource.btn.save,
iconCls:'btn-save',
handler: function(){
saveSites();
......@@ -26,9 +26,11 @@ define(function(){
}],
tools:[
{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
}
}]
}),
fitColumns:true,//使列自动展开/收缩到合适的DataGrid宽度
......@@ -56,7 +58,7 @@ define(function(){
//选择CRM账套
(function getCrmAccountSet(){
panel.find(".chooseCrmVal").bind('click',function(){
showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){
base.showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){
$('.accountSiteSet').find(".actId").val(row.ACT_ID);
$('.accountSiteSet').find(".actName").val(row.ACT_NAME);
......@@ -70,7 +72,7 @@ define(function(){
var actId = $('.accountSiteSet').find(".actId").val();
var actName =$('.accountSiteSet').find(".actName").val();
if(!actId){
$.messager.alert(resource.msg_title,resource.target.title.chooseCrm);
$.messager.alert(base.resource.msg_title,resource.target.title.chooseCrm);
return false;
}
var sites = $('.sites');
......@@ -87,7 +89,7 @@ define(function(){
width:'500',
height:'550',//auto
buttons:[{
text: resource.btn.confirm,
text: base.resource.btn.confirm,
handler:function() {
var totalRow = [];
......@@ -123,7 +125,7 @@ define(function(){
sites.dialog("close");
}
}, {
text: resource.btn.cancel,
text: base.resource.btn.cancel,
handler:function() {
sites.dialog("close");
}
......@@ -136,10 +138,10 @@ define(function(){
return control.find("."+data+"").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select',
handler:function(){
showCondObject("b7fa1a0e-099b-459d-8c77-69ebdc65ed42", function(){
base.showCondObject("b7fa1a0e-099b-459d-8c77-69ebdc65ed42", function(){
reload(control,data)
});
}
......@@ -163,7 +165,7 @@ define(function(){
endEditing();
var rows = dataGrid.datagrid('getRows');
if(rows.length<1){
$.messager.alert(resource.msg_title,resource.target.title.chooseSiteFir);
$.messager.alert(base.resource.msg_title,resource.target.title.chooseSiteFir);
return false;
}
var params =new Array();
......@@ -177,7 +179,7 @@ define(function(){
};
rowsTime =rows[i].YEAH.toString() + rows[i].MONTH;
if(rows[i].TARGET_RECRUIT==""){
$.messager.alert(resource.msg_title,resource.target.title.siteIs+rows[i].SICODE+resource.target.title.targetNotnull);
$.messager.alert(base.resource.msg_title,resource.target.title.siteIs+rows[i].SICODE+resource.target.title.targetNotnull);
return false;
}
param={
......@@ -189,10 +191,10 @@ define(function(){
params.push(param);
}
$.JSON("./customer/insertTarget.json",params,function(result){
if(responseUtils(result)){
$.messager.alert(resource.msg_title, resource.target.title.success);
closeSelectedPanel();
panelRefreshUtils();
if($.response(result)){
$.messager.alert(base.resource.msg_title, resource.target.title.success);
base.closeSelectedPanel();
base.panelRefresh();
}
});
}
......@@ -222,7 +224,7 @@ define(function(){
//刷新
function reload(control,data){
var param = getCondObjectValue("b7fa1a0e-099b-459d-8c77-69ebdc65ed42");
var param = base.getCondObjectValue("b7fa1a0e-099b-459d-8c77-69ebdc65ed42");
siteDatagridval.datagrid("reload",param);
}
......
define(function(){
define(['i18n!employee/nls/resource', 'cls', 'lodash', 'moment', 'base/index', 'index/index'], function (resource, Class, _, moment, base, layout){
return {
init : function(emid){
var panel=getSelectedPanel();
var panel=layout.getSelectedPanel();
var page=panel.children('.crm-employee-detail').layout({ fit:true });
var north=page.layout("panel","north");
var employeeForm= north.find(".employeeForm");
......@@ -44,7 +44,7 @@ define(function(){
var editPhone="";//手机
var editEmail="";//邮箱
var editCtcode="";//证件号码
initValidateboxForm()//验证
// initValidateboxForm()//验证
initForm();
maxLength();
editPanal();//编辑状态下填充页面数据
......@@ -55,14 +55,16 @@ define(function(){
north.children(".toolbar").rs_toolbar({
content:employeeForm,
buttons:[{
text:resource.btn.save,
text:base.resource.btn.save,
iconCls:'btn-save',
handler:saveEmployeeDetail
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
layout.panelRefresh();
}
}
]
});
......@@ -74,10 +76,10 @@ define(function(){
validType:'NumberLetter'
});
//公司查找框
readonlyUtils(coName.searchbox({
base.readonly(coName.searchbox({
required:true,
searcher:chooseCoName,
prompt:resource.employee.select
prompt:resource.select
}),function(){
coId="";
deName.searchbox("setValue","");
......@@ -86,10 +88,10 @@ define(function(){
poId.combobox('loadData',[]);
});
//部门查找框
readonlyUtils(deName.searchbox({
base.readonly(deName.searchbox({
required:false,
searcher:chooseDeName,
prompt:resource.employee.select
prompt:resource.select
}),function(){
deId=[];
poId.combobox('clear');
......@@ -106,7 +108,7 @@ define(function(){
});
entrydate.datetimebox({
value: new Date().format('yyyy-MM-dd HH:mm:ss'),
value: moment().format('YYYY-MM-DD HH:mm:ss'),
required: true,
editable:false
});
......@@ -212,16 +214,16 @@ define(function(){
}
function maxLength(){
maxlengthUtils(code,30);
maxlengthUtils(phone,120);
maxlengthUtils(email,120);
maxlengthUtils(ctcode,50);
maxlengthUtils(name,120);
maxlengthUtils(relman,60);
maxlengthUtils(reltel,30);
maxlengthUtils(post,30);
maxlengthUtils(addr,100);
maxlengthUtils(remark1,100);
base.maxlength(code,30);
base.maxlength(phone,120);
base.maxlength(email,120);
base.maxlength(ctcode,50);
base.maxlength(name,120);
base.maxlength(relman,60);
base.maxlength(reltel,30);
base.maxlength(post,30);
base.maxlength(addr,100);
base.maxlength(remark1,100);
}
//任职状态
......@@ -230,13 +232,13 @@ define(function(){
if(leavedate==""){
return state;
}else{
if(Date.parseDate(entrydate)>Date.parseDate(leavedate)){
$.messager.alert(resource.msg_title, resource.employee.dateCheck);
if(moment(leavedate).isBefore(entrydate)){
$.messager.alert(base.resource.msg_title, resource.dateCheck);
return;
}else{
if(Date.parseDate(entrydate) > new Date() ){
if(moment().isBefore(entrydate)){
state = true;//未入职
}else if(Date.parseDate(entrydate) < new Date() && new Date() < Date.parseDate(leavedate)){
}else if(moment(entrydate).isBefore(moment()) && moment().isBefore(leavedate)){
state = true;//在职
}else{
state = false;//离职
......@@ -316,7 +318,7 @@ define(function(){
data=getparam();
if(res==true){//在职或未入职
$.JSON("./employeeDetail/existsAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复
if(responseUtils(result)){
if($.response(result)){
addSubmit(data);
}
});
......@@ -329,11 +331,11 @@ define(function(){
//新增提交
function addSubmit(data){
$.messager.confirm(resource.msg_title,resource.users.saveTitle, function(r){
$.messager.confirm(base.resource.msg_title,base.resource.msgSaveTitle, function(r){
if (r){
$.JSON('./employeeDetail/insert.json',data,function(result){
if(responseUtils(result)){
closeSelectedPanel();
if($.response(result)){
layout.closeSelectedPanel();
}
});
}
......@@ -349,7 +351,7 @@ define(function(){
};
if(coid!=editCoId || cd!= editCode || na!=editName){//不与原“公司+工号+姓名”冲突
$.JSON("./employeeDetail/existsEmps.json",param,function(result){//先检查“公司+工号+姓名”是否重值
if(responseUtils(result)){//不重值
if($.response(result)){//不重值
//编辑数据
var data=[];
data=getparam();
......@@ -358,7 +360,7 @@ define(function(){
//判断涉及修改“工号、手机、邮箱”
if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){
$.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复
if(responseUtils(result)){
if($.response(result)){
//判断账户
$.post('./employeeDetail/existsUsers.json',{id:emid},function(result){
if(result.status=="success"){//无账户
......@@ -385,7 +387,7 @@ define(function(){
if(res==true){//在职或未入职
if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){
$.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复
if(responseUtils(result)){
if($.response(result)){
//判断账户
$.post('./employeeDetail/existsUsers.json',{id:emid},function(result){
if(result.status=="success"){//无账户
......@@ -413,7 +415,7 @@ define(function(){
if(res==true){//在职或未入职
if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){
$.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复
if(responseUtils(result)){
if($.response(result)){
//判断账户
$.post('./employeeDetail/existsUsers.json',{id:id},function(result){
if(result.status=="success"){//无账户
......@@ -434,11 +436,11 @@ define(function(){
//编辑提交
function editSubmit(data){
$.messager.confirm(resource.msg_title,resource.users.saveTitle, function(r){
$.messager.confirm(base.resource.msg_title,base.resource.msgSaveTitle, function(r){
if (r){
$.JSON('./employeeDetail/update.json',data,function(result){
if(responseUtils(result)){
closeSelectedPanel();
if($.response(result)){
layout.closeSelectedPanel();
}
});
}
......@@ -497,7 +499,7 @@ define(function(){
//选择公司名称和ID
function chooseCoName(){
showCondObject({id:"5d65968a-4b04-43c8-85c0-a00d06801d74", showGrid:true, singleSelect:true,refresh:true
base.showCondObject({id:"5d65968a-4b04-43c8-85c0-a00d06801d74", showGrid:true, singleSelect:true,refresh:true
/*,onBeforeLoad:function(params){
if($.cookie("rs-platform-id")!=1){
return params["96c37046-9ac8-4658-8d6a-8da37f6791f4"]=$.cookie("rs-platform-id");
......@@ -524,7 +526,7 @@ define(function(){
//选择部门名称和ID
function chooseDeName(){
if($.trim(coId)!=""){
showCondObject({id:"7949bd86-d694-4800-8a70-29f5bca505af", showGrid:true, singleSelect:false,refresh:true,onBeforeLoad:function(params){
base.showCondObject({id:"7949bd86-d694-4800-8a70-29f5bca505af", showGrid:true, singleSelect:false,refresh:true,onBeforeLoad:function(params){
return params["c2139911-0d31-4886-b6b8-fa9a84ea9b7d"]=coId;
}}, function(row){
deId=[];
......
define(["uploadify"],function(){
define(['i18n!employee/nls/resource', 'cls', 'lodash', 'moment', 'base/index', 'index/index','uploadify'], function (resource, Class, _, moment, base, layout){
return function(sessionId,rootUrl){
var pannel = getSelectedPanel();//初始化面板
var pannel = layout.getSelectedPanel();//初始化面板
var page = pannel.children(".employee-index-page").layout({
fit:true
});//定义面板内div
......@@ -11,14 +11,14 @@ define(["uploadify"],function(){
return $('<div></div>').appendTo(center).datagrid({
url:'./query/'+condId+'.json',
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title: resource.employee.title,
authz:getAuthzUtils('employee'),
title: resource.title,
authz:base.getAuthz('employee'),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select select-condition',
code:'view',
handler: function(){
showCondObject({
base.showCondObject({
id:condId,
onCascade:{
"81d2b9f9-1ead-48d0-9eb7-601d780c1673":{
......@@ -44,54 +44,56 @@ define(["uploadify"],function(){
},datagridReload);
}
},{
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
code:'edit',
handler: addWindow
},{
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
code:'edit',
handler: editWindow
},{
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
code:'edit',
handler: deleteEmp
}],
tools:[{ // 导出模板
code:'edit',
text:resource.btn.downloadExcel,
text:base.resource.btn.downloadExcel,
iconCls:'btn-down',
handler:function(){
var fileName="employeeTemplate.xlsx";
downloadExcel(fileName);
base.downloadExcelTemplate(fileName);
}
},{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
layout.panelRefresh();
}
},{ // 导入
code:'edit',
text:resource.btn.addByFile,
text:base.resource.btn.addByFile,
id:'btn-employee-import',
iconCls:'btn-down'
}]
}),
columns:[[
{field:'ck',checkbox:true },
{field:'EMID',title:resource.employee.grid.cmid, width:80},
{field:'EMCODE',title:resource.employee.grid.code, width:80},
{field:'EMNAME',title:resource.employee.grid.name, width:120},
{field:'CONAME',title:resource.employee.grid.corp, width:200,formatter:formatText},
{field:'DENAME',title:resource.employee.grid.dept, width:100,formatter:formatText},
{field:'PONAME',title:resource.employee.grid.post, width:100,formatter:formatText},
{field:'EMENTRYDATE',title:resource.employee.grid.entryDate, width:150,formatter:formatDate},
{field:'EMLEAVEDATE',title:resource.employee.grid.leaveDate, width:150,formatter:formatDate},
{field:'EMSTAUTS',title:resource.employee.grid.status, width:100},
{field:'EMPHONE',title:resource.employee.grid.phone, width:150,formatter:formatText},
{field:'EMEMAIL',title:resource.employee.grid.email, width:150,formatter:formatText},
{field:'EMLOSTPHONE',title:resource.employee.grid.lostPhone, width:150,formatter:formatText},
{field:'EMID',title:resource.grid.cmid, width:80},
{field:'EMCODE',title:resource.grid.code, width:80},
{field:'EMNAME',title:resource.grid.name, width:120},
{field:'CONAME',title:resource.grid.corp, width:200,formatter:formatText},
{field:'DENAME',title:resource.grid.dept, width:100,formatter:formatText},
{field:'PONAME',title:resource.grid.post, width:100,formatter:formatText},
{field:'EMENTRYDATE',title:resource.grid.entryDate, width:150,formatter:formatDate},
{field:'EMLEAVEDATE',title:resource.grid.leaveDate, width:150,formatter:formatDate},
{field:'EMSTAUTS',title:resource.grid.status, width:100},
{field:'EMPHONE',title:resource.grid.phone, width:150,formatter:formatText},
{field:'EMEMAIL',title:resource.grid.email, width:150,formatter:formatText},
{field:'EMLOSTPHONE',title:resource.grid.lostPhone, width:150,formatter:formatText},
]],
onLoadSuccess:function(data){
for(var i=0;i<data.rows.length;i++){
......@@ -113,21 +115,21 @@ define(["uploadify"],function(){
if(leavedate==undefined){
leavedate="";
}
var state = resource.employee.state.onJob;
var state = resource.state.onJob;
if(leavedate==""){
if(Date.parseDate(entrydate) > new Date() ){
state = resource.employee.state.noentry;//未入职
}else if(Date.parseDate(entrydate) < new Date()){
state = resource.employee.state.onJob;//在职
if(moment().isBefore(entrydate)){
state = resource.state.noentry;//未入职
}else if(moment().isAfter(entrydate)){
state = resource.state.onJob;//在职
}
return state;
}else{
if(Date.parseDate(entrydate) > new Date() ){
state = resource.employee.state.noentry;//未入职
}else if(Date.parseDate(entrydate) < new Date() && new Date() < Date.parseDate(leavedate)){
state = resource.employee.state.onJob;//在职
if(moment().isBefore(entrydate)){
state = resource.state.noentry;//未入职
}else if(moment(entrydate).isBefore(moment()) && moment().isBefore(leavedate)){
state = resource.state.onJob;//在职
}else{
state = resource.employee.state.leaveJob;//离职
state = resource.state.leaveJob;//离职
}
}
return state;
......@@ -143,13 +145,13 @@ define(["uploadify"],function(){
if(params){
grid.datagrid("reload",params);
}else{
grid.datagrid("reload",getCondObjectValue(condId));
grid.datagrid("reload",base.getCondObjectValue(condId));
}
}
//添加到雇员详情页面
function addWindow(){
//添加雇员详情页面
showTabUtils({text:resource.employee.detail,url:"./employeeDetail/detailAdd"}, true, function(){
layout.showPanel({text:resource.detail,url:"./employeeDetail/detailAdd"}, true, function(){
grid.datagrid("reload");
});
}
......@@ -157,9 +159,9 @@ define(["uploadify"],function(){
function editWindow(){
var row = grid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
showTabUtils({text:resource.employee.detail,url:"./employeeDetail/detailEdit?emId="+row.EMID}, true, function(){
layout.showPanel({text:resource.detail,url:"./employeeDetail/detailEdit?emId="+row.EMID}, true, function(){
grid.datagrid("reload");
});
}
......@@ -169,12 +171,12 @@ define(["uploadify"],function(){
function deleteEmp(){
var row = grid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
$.post("./employeeDetail/delete.json",{id:row.EMID},function(result){
if(responseUtils(result)){
if($.response(result)){
grid.datagrid("reload");
}
});
......
define({
root:{
title:'雇员信息',
detail:'雇员详情',
grid:{
cmid:'雇员ID',
code:'工号',
name:'姓名',
corp:'公司',
dept:'部门',
post:'岗位',
entryDate:'入职日期',
leaveDate:'离职日期',
status:'入职状态',
statusNon:'未入职',
statusYes:'在职',
statusNo:'离职',
phone:'手机',
email:'邮箱',
lostPhone:'挂失手机'
},
state:{
onJob:'在职',
noentry:'未入职',
leaveJob:'离职'
},
chsValid:'只能输入汉字!',
mobileValid:'请输入正确的手机号!',
zipCodeValid:'请输入正确的邮编!',
numberLetterValid:'工号只能输入数字、字母或其组合!',
select:'请选择',
dateCheck:'入职日期必须早于离职日期!'
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
......@@ -18,7 +18,7 @@ requirejs.config({
'easyui_zh-CN': '../third/easyui/locale/easyui-lang-zh_CN',
moment:'../third/moment/moment.min',
lodash:'../third/lodash/lodash.min',
qrcode: '../third/easyui/jquery.qrcode',
qrcode: '../third/jquery/jquery.qrcode',
jspdf: '../third/pdf/jspdf.min',
echarts: '../third/echarts/echarts-all',
ckeditor: '../third/ckeditor/ckeditor',
......
This diff could not be displayed because it is too large.
define({
root:{
detail:'营销活动详情',
marketEnd:'活动已结束, 不能提交!',
timeOut:'日期已超时,请驳回该活动!',
timeBeforeNow:'该活动结束时间早于当前时间,无法继续执行!',
moreThenOneDay:'每周至少选择一天',
confirmDelet:'确认删除',
pushObj:'推送对象组',
select:'请选择',
coupon:{
send:'立即送券',
repeat:'券重复',
type:'送礼券型',
noLimit:'不限'
},
point:{
send:'立即送积点'
},
title:{
approval:'审批',
stop:'中止',
resume:'继续执行',
eventList:'活动列表'
},
grid:{
mktcode:'活动编号',
mktname:'活动名称',
stime:'开始时间',
etime:'结束时间',
mkttype:'活动类型',
mktproject:'所属营销项目',
refno:'相关活动编号',
orname:'发起组织',
chname:'发起渠道',
emname:'创建人',
rectime:'创建时间',
spname:'审批人',
sptime:'审批时间',
enable:'可用',
mktstat:'审批状态'
},
approval:{
state0:'创建中',
state1:'待审批',
state2:'已核准',
state3:'已驳回',
state4:'已中止'
},
channelContent:{
msg:'短信内容不能为空!',
msgChl:'短信通道不能为空!',
MMS:'彩信内容不能为空!',
MMSChl:'彩信通道不能为空!',
MMSTheme:'彩信主题不能为空!',
email:'邮件正文不能为空!',
emailChl:'邮箱通道不能为空!',
emailTheme:'邮箱主题不能为空!'
},
weChat:{
send:'微信服务号测试发送',
pushMsgNull:'推送消息不能为空'
},
phone:{
send:'手机测试发送',
exist:'已存在',
moreThenTen:'手机号不能超过10个',
notNull:'不能为空'
},
email:{
send:'邮件测试发送'
},
step:{
back:'上一步',
next:'下一步',
save:'保存',
saveAndSubmit:'保存并提交',
abandon:'放弃',
success:'提交成功',
abandonBtn:'是否放弃此次操作'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define({
root:{
azonic:"不限",
opt:"请选择",
bizEntity:"请选择经营主体",
setGZH:"设置公众号",
editCheck:"该数据非本平台创建!",
descLenght:"描述字段长度100!",
providerlength:"服务提供商输入长度超过60!",
msgType:{
note:"短信",
email:"邮箱",
weChat:"微信"
},
verify:{
negative:"未认证",
one:"新浪微博认证",
two:"腾讯微博认证",
three:"已资质认证通过但还未通过名",
four:"已资质认证通过、还未通过名称认证,但通过了新浪微博认证",
five:"代表已资质认证通过、还未通过名称认证,但通过了腾讯微博认证"
},
protocol:{
one:"推送验证码",
two:"推送文本"
},
optTitle:{
addMsg:"短信通道",
addMms:"彩信通道",
addEmail:"邮箱通道",
addweChat:"配置适用主体"
},
tab:{
note:{
tabTitle:"短信",
dataGridTitle:"短信通道",
dataGrid:{
ID:'系统ID',
name:'名称',
type:'类型',
desc:'描述',
protocol:'服务类型',
remain:'账户余量(条)',
bizEntity:'适用经营主体',
bizSetOfBook:'适用结算主体',
plName:"创建平台"
},
addDialog:{
msname:"名称",
msdesc:"描述",
mstype:"类型",
type:"短信",
msprovider:"服务提供商",
msaccount:"账户ID",
mspassword:"密码",
msprotocol:"服务类型",
msremain:"账户余量",
msBizEntity:"适用经营主体",
msSetOfBook:"适用结算主体",
refresh:"刷新"
}
},
email:{
tabTitle:"邮箱",
dataGridTitle:"短信通道",
dataGrid:{
ID:'系统ID',
name:'名称',
type:'类型',
desc:'描述',
provider:'发送服务器',
remain:'用户名',
bizEntity:'适用经营主体',
bizSetOfBook:'适用结算主体',
plName:"创建平台",
protocol:"邮件类型"
},
mcemailtype:{
one:"SMTP",
two:"Exchange"
},
addDialog:{
emname:"名称",
emdesc:"描述",
emtype:"类型",
em:"邮箱",
emprovider:"发送服务器",
ememailType:"邮件类型",
emaccount:"用户名",
empassword:"密码",
emprotocol:"协议类型",
emremain:"端口",
emBizEntity:"适用经营主体",
emSetOfBook:"适用结算主体"
}
},
weChat:{
tabTitle:"微信服务号",
dataGridTitle:"短信通道",
weChatOpt:"设置公众号",
dataGrid:{
name:'名称',
type:'类型',
desc:'描述',
originalID:'原始ID',
emsCnplID:'公众号ID',
acstatus:'认证状态',
platform:'配置平台',
brand:"经营品牌",
bizEntity:"适用经营主体"
}
},
subscriber:{
tabTitle:"微信订阅号",
setBizEntity:"配置适用主体",
addDialog:{
msgChannel:"推送通道",
mstype:"类型",
weChatType:"微信服务号",
bizEntity:'适用经营主体'
}
},
mms:{
tabTitle:"彩信",
dataGridTitle:"彩信通道",
dataGrid:{
ID:'系统ID',
name:'名称',
type:'类型',
desc:'描述',
protocol:'服务类型',
remain:'账户余量(条)',
bizEntity:'适用经营主体',
bizSetOfBook:'适用结算主体',
plName:"创建平台"
},
addDialog:{
msname:"名称",
msdesc:"描述",
mstype:"类型",
type:"彩信",
msprovider:"服务提供商",
msaccount:"账户ID",
mspassword:"密码",
msprotocol:"服务类型",
msremain:"账户余量",
msBizEntity:"适用经营主体",
msSetOfBook:"适用结算主体",
refresh:"刷新"
}
}
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!orgChannel/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return function(){
var pannel = getSelectedPanel();//初始化面板
var pannel = layout.getSelectedPanel();//初始化面板
var page = pannel.children(".orgChannel-index-page").layout({
fit:true
});//定义面板内div
......@@ -29,7 +29,7 @@ define(function(){
*/
function initbutton() {
center.find(".toolbar").rs_toolbar({
authz:getAuthzUtils('orgChannel'),
authz:base.getAuthz('orgChannel'),
content : orgChannelForm,
// buttons : [ {
// text : resource.btn.save,
......@@ -38,11 +38,13 @@ define(function(){
// handler : function(){}
// } ],
tools : [ {
text : resource.btn.refresh,
text : base.resource.btn.refresh,
iconCls : 'btn-refresh',
handler : panelRefreshUtils
handler : function () {
layout.panelRefresh();
}
}, {
text : resource.btn.more,
text : base.resource.btn.more,
iconCls : 'btn-more',
handler : function() {
}
......@@ -60,7 +62,7 @@ define(function(){
onClick : refreshData
});
search.searchbox({
prompt:resource.organization.search,
prompt:resource.search,
width:200,
searcher:function(value,name){
orgChannelTree.tree({
......@@ -78,16 +80,16 @@ define(function(){
function initDatagrid(){
var datagrid = $('<div></div>').appendTo(siteGrid).datagrid({
data:{"total":0,"status":"success","list":[]},
title: resource.orgChannel.site.title,
title: resource.site.title,
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
authz:getAuthzUtils('orgChannel'),
authz:base.getAuthz('orgChannel'),
buttons:[{
text:resource.orgChannel.site.add,
text:resource.site.add,
iconCls:'btn-add',
code:'edit',
handler: addEvent
},{
text:resource.orgChannel.site.remove,
text:resource.site.remove,
iconCls:'btn-remove',
code:'edit',
handler: deleteEvent
......@@ -97,15 +99,15 @@ define(function(){
singleSelect:false,
columns:[[
{field:'ck',checkbox:true },
{field:'SICODE',title:resource.orgChannel.site.grid.code, width:80},
{field:'SINAME',title:resource.orgChannel.site.grid.name, width:200},
{field:'SITYPENAME',title:resource.orgChannel.site.grid.type, width:150},
{field:'BENAME',title:resource.orgChannel.site.grid.beName, width:150},
{field:'ORNAME',title:resource.orgChannel.site.grid.orName, width:150}
{field:'SICODE',title:resource.site.grid.code, width:80},
{field:'SINAME',title:resource.site.grid.name, width:200},
{field:'SITYPENAME',title:resource.site.grid.type, width:150},
{field:'BENAME',title:resource.site.grid.beName, width:150},
{field:'ORNAME',title:resource.site.grid.orName, width:150}
]]
});
site_search.searchbox({
prompt:resource.organization.search,
prompt:resource.search,
searcher:function(value,name){
datagrid.datagrid({
queryParams: {
......@@ -176,7 +178,7 @@ define(function(){
function addEvent(){
var node = orgChannelTree.tree('getSelected');
if(node){
showCondObject({
base.showCondObject({
id : "cae9d408-2c74-11e6-abf4-3c970e1c88a0",
showGrid : true,
singleSelect : false,
......@@ -210,10 +212,10 @@ define(function(){
function deleteEvent(){
var rows = grid.datagrid('getSelections');
if(rows.length == 0){
$.messager.alert(resource.msg_title,resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title,base.resource.msgRemoveTip);
} else {
$.messager.confirm(resource.msg_title,
resource.orgChannel.site.isDelete, function(r) {
$.messager.confirm(base.resource.msg_title,
resource.site.isDelete, function(r) {
if (r) {
var sirId = new Array();
for (var i = 0; i < rows.length; i++) {
......
define({
root:{
channel:'经营渠道',
ptValidYes:'是',
ptValidNo:'否',
search:'查找关键字',
site:{
title:'网点',
grid:{
code:'编号',
name:'名称',
type:'组织类型',
beName:'经营主体',
orName:'管辖组织'
},
isDelete:'你确定要删除这些网点吗?',
add:'添加',
remove:'移除'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define({
root:{
HQ:'总部',
Filiale:'分销商',
RegI:'区域机构',
Jurisdiction:'管辖组织',
cannotAddNext:'根节点无法插入平级组织!',
isMove:'您确定要移动此组织及其下属组织吗?',
selectNode:'请选择要保存的组织节点!',
search:'查找关键字',
cannotDeleteRoot:'根节点无法删除!',
cannotDelete:'该组织下面存在子节点,无法删除!',
selectChannel:'请选择经营渠道!',
channel:{
title:'经营渠道',
apply:'适用',
channel:'经营渠道',
setOfBook:'默认结算账套',
yes:"是",
no:"否"
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!platform/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(){
var panel=getSelectedPanel();
var layout=panel.children('.sys-platform').layout({
fit:true
});
var panel=layout.getSelectedPanel();
var page = panel.children(".sys-platform").layout({
fit:true
});
......@@ -14,7 +11,7 @@ define(function(){
var buttons = page.find(".rs-toolbar").find(".button");// 按钮组
var ptDialog = page.find(".pl-role-details-type").dialog({
title: resource.msg_title,
title: base.resource.msg_title,
closed : true,
width : '629',
height: 'auto',
......@@ -26,52 +23,54 @@ define(function(){
return center.children(".sys-plat-table").datagrid({
url:'./query/'+condId+'.json',
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:resource.platform.title,
authz:getAuthzUtils('platform'),
title:resource.title,
authz:base.getAuthz('platform'),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:'btn-select select-condition',
code:'view',
handler: function(){
showCondObject(condId,datagridReload);
base.showCondObject(condId,datagridReload);
}
},{
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
code:'edit',
handler: addEvent
},{
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
code:'edit',
handler: editEvent
},{
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
code:'edit',
handler: deleteEvent
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
}]
}),
columns:[[
{field:'ck',checkbox:true },
{"field":"PLCODE","title":resource.platform.grid.code,"width":100},
{"field":"PLNAME","title":resource.platform.grid.name,"width":250},
{"field":"PLTNAME","title":resource.platform.grid.typeName,"width":120},
{"field":"PLPERMNUM","title":resource.platform.grid.permNum,"width":120,formatter: function(value,row,index){
{"field":"PLCODE","title":resource.grid.code,"width":100},
{"field":"PLNAME","title":resource.grid.name,"width":250},
{"field":"PLTNAME","title":resource.grid.typeName,"width":120},
{"field":"PLPERMNUM","title":resource.grid.permNum,"width":120,formatter: function(value,row,index){
if(value == null){
return resource.platform.unlimited;
return resource.unlimited;
} else {
return value;
}
}
},
//{"field":"PLREG","title":resource.platform.grid.enabled,"width":100},
{"field":"PLSTATUS","title":resource.platform.grid.status,"width":100}
{"field":"PLSTATUS","title":resource.grid.status,"width":100}
]],
onSelect:function(index,row){
if(row.PLTID != 3){// 不是分销商平台的话,删除按钮置灰
......@@ -89,7 +88,7 @@ define(function(){
if(params){
datagrid.datagrid("reload",params);
}else{
datagrid.datagrid("reload",getCondObjectValue(condId));
datagrid.datagrid("reload",base.getCondObjectValue(condId));
}
}
......@@ -106,9 +105,9 @@ define(function(){
function editEvent(){
var row = datagrid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
showTabUtils({text:resource.platform.detailsTitle,url:"./platform/platformEdit?plId="+row.PLID+"&tId="+row.PLTID}, true, function(){
layout.showPanel({text:resource.detailsTitle,url:"./platform/platformEdit?plId="+row.PLID+"&tId="+row.PLTID}, true, function(){
datagrid.datagrid("reload");
});
}
......@@ -120,7 +119,7 @@ define(function(){
function selectEvent(){
var pltId = $(this).attr("data-options");
ptDialog.dialog("close");
showTabUtils({text:resource.platform.detailsTitle,url:"./platform/platformAdd?tId="+pltId}, true, function(){
layout.showPanel({text:resource.detailsTitle,url:"./platform/platformAdd?tId="+pltId}, true, function(){
datagrid.datagrid("reload");
});
}
......@@ -131,12 +130,12 @@ define(function(){
function deleteEvent(){
var row = datagrid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
$.post("./platform/detelePlatform.json",{plId:row.PLID},function(result){
if(responseUtils(result)){
if($.response(result)){
datagrid.datagrid("reload");
}
});
......
define({
root:{
title:'用户平台',
detailsTitle:'用户平台详情',
select:'请选择',
auto:'自动',
unlimited:'不限',
title:'',
numberValid:'请输入数字',
distributorPlatform:'分销商平台',
weChatEnterprise:'微信企业号',
runsaPortal:'RUNSA PORTAL',
open:'开启',
insertTip:'请填写已存在的分销商编号和名称',
grid:{
code:'平台编号',
name:'平台名称',
typeName:'平台类型',
permNum:'最大许可用户数',
enabled :'启用注册',
status:'开启状态',
enabledYes:'已注册',
enabledNo:'未注册',
statusYes:'是',
statusNo:'否'
},
span:{
code:'平台编号',
name:'平台名称',
typeName:'平台类型',
loginType:'登录门户',
openStatus:'开启状态',
logo:'平台LOGO',
permNum:'许可最大用户数',
validityPeriod:'有效期',
remainDay:'剩余有效天数',
manager:'管理员',
phone:'手机',
email:'邮箱',
emailPush:'邮件推送通道',
loginAuth:'登录验证短信通道',
remainSMS:'短信账户余量',
textMsg:'文本推送短信通道'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define({
root:{
tabTxt:{
pointadjdetail:'积点调整单',
pointadj:'积点调整'
},
datagrid:{
title:'积点调整',
ADJ_ID:'调整单编号',
ACT_NAME:'积点账套',
BEBNAME:'结算主体',
DEF_DAYS:'积点有效期',
EMNAME:'创建人',
REC_TIME:'创建时间',
AUTHNAME:'审批人',
AUTHTIME:'审批时间',
APRO_STAT:'审批状态'
},
pointAdjDetailDatagrid:{
title:'积点调整列表',
CST_ID:'顾客Id',
CST_NAME:'顾客昵称',
PHONE:'手机号',
POINTS:'调整积点值',
E_TIME:'有效期截止日期',
ORDER_ID:'关联单据号',
REMARK:'备注',
STATUS:'状态',
NOADJ:'未调整',
ADJED:'已调整',
ADJ_FAIL:'调整失败',
RESULT_MEMO:'结果备注'
},
msg:{
actNameForbidUpdate:'积点账套不能修改',
savepointadjdetail:'请先保存积点调整单',
saveSuccess:'保存成功',
updateSuccess:'修改成功',
adjValNotZero:'积点值不能为0',
onlineOrder:'网上订单',
updateAdj:'编辑的积点'
},
approval:{
state0:'创建中',
state1:'待审批',
state2:'已核准',
state3:'已驳回'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define({
root:{
name:'网点列表',
preview:"预览",
print:"打印",
exports:"导出",
choosedata:'请选择要操作的数据!',
grid:{
sicode:'编号',
siname:'名称',
ptaddr:'地址',
ptphone:'电话'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!qrcode/nls/resource', 'cls', 'moment', 'base/index', 'index/index', 'jspdf' ,'qrcode'], function (resource, Class, moment, base, layout,jsPDF){
return {
init : function(){
// 页面初始化
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".crm-qrcode-detail").show().layout({fit:true});
var siteQuery = "45abc2ee-2404-4656-9595-0e9b67e0eddf"; //初始化网点查询
var siteCondition = "52ece2ce-cfb2-4a76-875e-1c91b5922bf2"; //初始化网点查询条件
......@@ -12,7 +12,7 @@ define(function(){
// 选择微信公众号
function getWxGzh(){
panel.find(".gzhNamePic").bind('click',function(){
showCondObject({id:"ca615ca6-fc66-4fcc-9b5a-4dcf45fc7941", showGrid:true, singleSelect:true}, function(row){
base.showCondObject({id:"ca615ca6-fc66-4fcc-9b5a-4dcf45fc7941", showGrid:true, singleSelect:true}, function(row){
panel.find(".gzhId").val(row.GZH_ID);
panel.find(".gzhName").val(row.NICK_NAME);
var paraUrl="./query/"+siteQuery+".json?52ece2ce-cfb2-4a76-875e-1c91b5922bf2="+row.GZH_ID;
......@@ -22,7 +22,7 @@ define(function(){
}
function datagridReload(){
var params=getCondObjectValue(siteQuery);
var params=base.getCondObjectValue(siteQuery);
params[siteCondition]=panel.find(".gzhId").val();
initSiteDatagrid.datagrid("reload",params);
}
......@@ -31,35 +31,37 @@ define(function(){
function initSiteDatagrid(){
return panel.find(".crm-qrcode-site").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
authz:getAuthzUtils('qrcode'),
authz:base.getAuthz('qrcode'),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(siteQuery,datagridReload);
base.showCondObject(siteQuery,datagridReload);
}
}],
tools:[{ // 导出
code:'edit',
text:resource.btn.exportPdf,
text:base.resource.btn.exportPdf,
iconCls: 'btn-down',
handler:exportPdf
},{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
}]
}),
title:resource.qrcode.name,
title:resource.name,
url:"./query/"+siteQuery+".json?52ece2ce-cfb2-4a76-875e-1c91b5922bf2=999",
fitColumns:true,
singleSelect:false,
columns:[[
{field:'ck',checkbox:true },
{field:'SICODE',title:resource.qrcode.grid.sicode, width:80, align:"center"},
{field:'SINAME',title:resource.qrcode.grid.siname, width:120, align:"center"},
{field:'PTADDR',title:resource.qrcode.grid.ptaddr, width:120, align:"center"},
{field:'PTPHONE',title:resource.qrcode.grid.ptphone, width:120, align:"center"},
{field:'SICODE',title:resource.grid.sicode, width:80, align:"center"},
{field:'SINAME',title:resource.grid.siname, width:120, align:"center"},
{field:'PTADDR',title:resource.grid.ptaddr, width:120, align:"center"},
{field:'PTPHONE',title:resource.grid.ptphone, width:120, align:"center"},
]]
})
}
......@@ -67,7 +69,7 @@ define(function(){
function exportPdf(){
var rows = initSiteDatagrid.datagrid("getSelections");
if(rows.length == 0){
$.messager.alert(resource.msg_title, resource.qrcode.choosedata);
$.messager.alert(base.resource.msg_title, resource.choosedata);
}else{
var doc = new jsPDF();
var qrcode="";
......@@ -81,7 +83,7 @@ define(function(){
gzhId:page.find(".gzhId").val(),
siCodes:siCode
}, function(result) {
if (responseUtils(result)) {
if ($.response(result)) {
var doc = new jsPDF();
page.find('.qrcode').empty();
for(var i=0;i<result.list.length;i++){
......
define({
root:{
submitPhone:"确认挂失?",
relivePhone:"确认解挂?",
reportLocale:"挂失手机",
reportTypeLocale:"挂失类型",
relieveLocale:"解挂手机",
phoneGone:"没有找到这个手机号!",
phoneRep:"这个手机号已经挂失!",
phoneNotrep:"您输入的号码不是挂失手机号!",
searchLabel:"查询手机号",
type:{
report:"挂失",
relive:"解挂"
},
emtype:{
em:"雇员",
cust:"顾客"
},
datagrid:{
phone:"手机号",
typeLocale:"挂失类型",
type:{
phoneLose:"手机丢失",
weChatLose:"微信号被盗",
custom:"自定义"
},
opt:"操作",
optUser:"操作人",
optTime:"操作时间",
emName:"姓名/昵称",
emtype:"类型",
platform:"操作平台"
},
submitlose:{
btnTitle:{
submitBtn:'确认挂失',
reliveBtn:'确认解挂'
},
recordDataGrid:{
title:'挂失/解挂记录'
},
report:"挂失成功!",
emphone:"输入手机号",
deblocking:"解挂成功!",
title:'挂失/解挂记录'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
......@@ -2,7 +2,6 @@ define(['i18n!role/nls/resource', 'cls', 'base/index', 'index/index'], function
return Class({
resource: resource,
variable: function (a,b) {
alert(a);
var panel = index.getSelectedPanel();
this.page = panel.children('.pl-role-page').layout({fit: true});
this.north = this.page.layout("panel", "north");
......
define(function(){
define(['cls', 'moment', 'base/index', 'index/index'], function (Class, moment, base, layout){
return {
init : function(){
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var page = pannel.children(".crm-mp-setGzh").show().layout({fit:true});
var datagrid = initDatagrid();
......@@ -17,19 +17,28 @@ define(function(){
},
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:"设置公众号",
authz:getAuthzUtils('setGzh'),
authz:base.getAuthz('setGzh'),
tools:[{
text:resource.btn.print,
text:base.resource.btn.print,
iconCls:'btn-print',
handler:panelRefreshUtils
// handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
},{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
// handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
},{
text:resource.btn.more,
text:base.resource.btn.more,
iconCls:'btn-more',
handler:panelRefreshUtils
// handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
}]
}),
columns:[[
......@@ -82,7 +91,7 @@ define(function(){
function setGzh(){
var row = datagrid.datagrid('getSelected');
if(row == null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
window.open("http://weixintest.runsasoft.com/auth/authorize?crmId="+row.crmId+"&gzhId="+row.GZH_ID);
}
......
define({
root: {
select:'请选择',
title:{
name:'积点账套',
add:'并且',
pointrule:'事件积点规则',
pointstrategy:'积点抵现策略',
period:'积点有效期',
success:'设置成功!',
chooseEvt:'选择--元事件',
chooseAddevt:'请选择要添加的元事件!',
evtExist:'该事件已存在,请重新选择!',
setPoint:'事件积点设置',
importPoint:'请输入有效的积点有效期!(正整数:1-',
setEffectPoint:'请设置有效的积点参数(非负数:0-',
importDays:'请输入有效的天数!(正整数:1-',
importTimes:'请输入有效的次数!(正整数:1-',
consumeMoney:'消费金额段',
consumeCount:'消费折数段',
lastColumnNotnull:'除最后一行不能存在空消费段!',
importPositiveNum:'请输入正数!',
importToobig:'输入值太大![',
importToosmall:'输入值太小![',
nolessthan:'不小于',
nomorethan:'不大于',
singleConsumeMon:'单笔消费金额段',
singleConsumeCount:'单笔消费折数段'
},
grid:{
pntid:'积点账套ID',
pntsetname:'积点账套名称',
pntunit:'积点单位',
pntuv:'积点价值',
enable:'可用',
isfans:'粉丝是否适用',
actname:'所属CRM账套',
pointrule:'积点规则',
pointstrategy:'积点抵现策略',
pointvalidity:'积点有效期',
evtcode:'事件ID',
evtname:'事件名称',
evtdesc:'事件描述'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-1').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-10').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-11').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-12').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-13').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-2').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var act_id = pnt_selected.ACTID;
var selected_0 = $('.crm-setpoint-template-3').find('.tpl-selected-0');
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var act_id = pnt_selected.ACTID;
var selected_0 = $('.crm-setpoint-template-4').find('.tpl-selected-0');
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-5').find('.tpl-selected-0');
var table_0 = selected_0.find('.tpl-points-0');
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var act_id = pnt_selected.ACTID;
var selected_0 = $('.crm-setpoint-template-6').find('.tpl-selected-0');
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
//common
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var act_id = pnt_selected.ACTID;//账套ID
var raks = setpointutils.getCustomerRank(act_id);//顾客评级
......@@ -36,7 +36,7 @@ define(function() {
if(points_2) setpointutils.setPointsToTpl(JSON.parse(points_2), selected_2,2);
function segment_editMoney() {
title = resource.setpoint.title.consumeMoney;
title = resource.title.consumeMoney;
if(!segment_inited) {
segment_consumeDialog_f(title);
segment_inited = true;
......@@ -53,7 +53,7 @@ define(function() {
}
function segment_editDiscount() {
title = resource.setpoint.title.consumeCount;
title = resource.title.consumeCount;
if(!segment_inited) {
segment_consumeDialog_f(title);
segment_inited = true;
......@@ -73,10 +73,10 @@ define(function() {
function segment_setDw(dw) {
var tr_item = $(segment_consumeDialog.children('.segment-tr')[0]).children();
if(dw) {
$(tr_item[2]).text(dw + resource.setpoint.title.add);
$(tr_item[2]).text(dw + resource.title.add);
$(tr_item[5]).text(dw);
} else {
$(tr_item[2]).text(resource.setpoint.title.add);
$(tr_item[2]).text(resource.title.add);
$(tr_item[5]).text('');
}
}
......@@ -87,18 +87,18 @@ define(function() {
segment_consumeDialog.dialog({
title:title,
buttons:[{
text:resource.btn.confirm,
text:base.resource.btn.confirm,
handler:function() {
if(segment_check()) {
segment_confirm(tpl_selected_no);
segment_consumeDialog.dialog('close');
} else {
alert(resource.setpoint.title.lastColumnNotnull);
alert(resource.title.lastColumnNotnull);
}
}
},
{
text:resource.btn.cancel,
text:base.resource.btn.cancel,
handler:function() {
segment_consumeDialog.dialog('close');
}
......@@ -109,11 +109,11 @@ define(function() {
toolbar:$('<div class="segment-toolbar"></div>').rs_toolbar({
buttons:
[{
text: resource.btn.add,
text: base.resource.btn.add,
iconCls:'btn-add',
handler: segment_add_f
},{
text: resource.btn.remove,
text: base.resource.btn.remove,
iconCls:'btn-remove',
handler: segment_remove_f
}]
......@@ -150,7 +150,7 @@ define(function() {
var this_value = $(this).val();
if(this_value == '') return;
if(!setpointutils.isPositive(this_value)) {
alert(resource.setpoint.title.importPositiveNum);
alert(resource.title.importPositiveNum);
$(this).val('');
return;
}
......@@ -160,7 +160,7 @@ define(function() {
if(next.length == 1) {
next_value = next.find('.segment-input-ed').val();
if(next_value && Number(next_value) <= Number(this_value)) {
alert(resource.setpoint.title.importToobig+this_value+resource.setpoint.title.nolessthan+next_value+']');
alert(resource.title.importToobig+this_value+resource.title.nolessthan+next_value+']');
$(this).val('');
next_revalue_flag = false;
return;
......@@ -169,7 +169,7 @@ define(function() {
if(prev.length == 1) {
prev_value = prev.find('.segment-input-ed').val();
if(prev_value && Number(prev_value) >= Number(this_value)) {
alert(resource.setpoint.title.importToosmall+this_value+resource.setpoint.title.nomorethan+prev_value+']');
alert(resource.title.importToosmall+this_value+resource.title.nomorethan+prev_value+']');
$(this).val('');
next_revalue_flag = false;
return;
......@@ -267,9 +267,9 @@ define(function() {
var title = '';
var dw = '';
if('tpl-selected-1' == selected_no) {
title = resource.setpoint.title.singleConsumeMon;
title = resource.title.singleConsumeMon;
} else {
title = resource.setpoint.title.singleConsumeCount;
title = resource.title.singleConsumeCount;
dw = '% ';
}
if(typeof(custom) == 'string') {
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-8').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init:function() {
var pannel = getSelectedPanel();
var pannel = layout.getSelectedPanel();
var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected');
var selected_0 = $('.crm-setpoint-template-9').find('.tpl-selected-0');
var points_0 = selected_0.find('.tpl-points-0');
......@@ -16,7 +16,7 @@ define(function() {
points_1.blur(function() {
var value = points_1.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() {
points_1.val('');
points_1.focus();
});
......@@ -26,7 +26,7 @@ define(function() {
points_2.blur(function() {
var value = points_2.val();
if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) {
$.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() {
$.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() {
points_2.val('');
points_2.focus();
});
......
define(function() {
define(['i18n!site/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(pltId) {
var pannel = getSelectedPanel();// 初始化面板
var pannel = layout.getSelectedPanel();// 初始化面板
var page = pannel.children(".site-index-page").layout({
fit : true
});// 定义面板内div
......@@ -17,15 +17,15 @@ define(function() {
toolbar : $('<div class="clearfix"></div>')
.rs_toolbar(
{
title : resource.site.title,
authz : getAuthzUtils('site'),
title : resource.title,
authz : base.getAuthz('site'),
buttons : [
{
text : resource.btn.select,
text : base.resource.btn.select,
iconCls : 'btn-select select-condition',
code : 'view',
handler : function() {
showCondObject({
base.showCondObject({
id:condId,
onCascade:{
"d2c08972-00d8-4d90-a315-7c20bff323df":{
......@@ -52,27 +52,29 @@ define(function() {
}
},
{
text : resource.btn.add,
text : base.resource.btn.add,
iconCls : 'btn-add',
code : 'edit',
handler : addWindow
},
{
text : resource.btn.edit,
text : base.resource.btn.edit,
iconCls : 'btn-edit',
code : 'edit',
handler : editWindow
},
{
text : resource.btn.remove,
text : base.resource.btn.remove,
iconCls : 'btn-remove',
code : 'edit',
handler : deleteSite
} ],
tools : [ {
text : resource.btn.refresh,
text : base.resource.btn.refresh,
iconCls : 'btn-refresh',
handler : panelRefreshUtils
handler : function () {
layout.panelRefresh();
}
} ]
}),
columns : [ [
......@@ -82,52 +84,52 @@ define(function() {
},
{
field : 'SIID',
title : resource.site.grid.siid,
title : resource.grid.siid,
hidden : true
},
{
field : 'SICODE',
title : resource.site.grid.siCode,
title : resource.grid.siCode,
width : 100
},
{
field : 'SINAME',
title : resource.site.grid.siName,
title : resource.grid.siName,
width : 200
},
{
field : 'VAINAME',
title : resource.site.grid.vaiName,
title : resource.grid.vaiName,
width : 100
},
{
field : 'BENAME',
title : resource.site.grid.beName,
title : resource.grid.beName,
width : 150
},
{
field : 'BEBNAME',
title : resource.site.grid.bebName,
title : resource.grid.bebName,
width : 150
},
{
field : 'BRNAME',
title : resource.site.grid.brName,
title : resource.grid.brName,
width : 500
},
{
field : 'CHNAME',
title : resource.site.grid.chName,
title : resource.grid.chName,
width : 150
},
{
field : 'PTVALID',
title : resource.site.grid.ptValid,
title : resource.grid.ptValid,
width : 100,
formatter : function(value,
row, index) {
return value == 0 ? resource.site.grid.ptValidNo
: resource.site.grid.ptValidYes;
return value == 0 ? resource.grid.ptValidNo
: resource.grid.ptValidYes;
}
} ] ],
onLoadSuccess:function(data){
......@@ -146,13 +148,13 @@ define(function() {
if (params) {
grid.datagrid("reload", params);
} else {
grid.datagrid("reload", getCondObjectValue(condId));
grid.datagrid("reload", base.getCondObjectValue(condId));
}
}
// 添加到网点详情页面
function addWindow() {
showTabUtils({
layout.showPanel({
text : "网点详情",
url : "./siteDetail/detailAdd"
}, true, function() {
......@@ -164,9 +166,9 @@ define(function() {
function editWindow() {
var row = grid.datagrid('getSelected');
if (row == null) {
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
} else {
showTabUtils({
layout.showPanel({
text : "网点详情",
url : "./siteDetail/detailEdit?siid=" + row.SIID
}, true, function() {
......@@ -179,15 +181,15 @@ define(function() {
function deleteSite() {
var row = grid.datagrid('getSelected');
if (row == null) {
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
} else {
$.messager.confirm(resource.msg_title,
resource.confirmDelete, function(r) {
$.messager.confirm(base.resource.msg_title,
base.resource.confirmDelete, function(r) {
if (r) {
$.post("./siteDetail/deleteSite.json", {
siid : row.SIID
}, function(result) {
if (responseUtils(result)) {
if ($.response(result)) {
grid.datagrid("reload");
}
});
......
define({
root: {
title:'网点',
grid:{
siid:'网点ID',
siCode:'网点编号',
siName:'网点名称',
vaiName:'组织类型',
beName:'经营主体',
bebName:'结算主体',
brName:'经营品牌',
chName:'经营渠道',
ptValid:'可用',
ptValidYes:'是',
ptValidNo:'否'
},
paytitle:'收款方式',
paygrid:{
sipId:'店铺付款方式Id',
pwName:'收款方式',
bepId:'收款方式ID',
bepName:'收款方式',
cuName:'币种单位',
cuRate:'汇率',
bepProceeds:'收款渠道/银行',
bepPayee:'帐款人',
bepAccount:'收款账号',
bepPoint:'消费积分',
ptValid:'可用'
},
orgTypeDialogTitle:'选择新建的组织类型',
check:{
channelRepeat:'您选择的经营渠道已经存在,请重新选择!',
brandRepeat:'您选择的经营品牌与其它渠道上的经营品牌有冲突,请重新选择!',
paywayRepeat:'您选择的收款方式与已选择的有冲突,请重新选择!',
exitSiCode:'网点编号重复,请重新输入!',
siCodeValid:'只能输入数字、字母和和其它字符!',
empRepeat:'您选择的雇员与已选择的有冲突,请重新选择!'
},
guidertitle:'导购',
guiderAddBtn:'新增',
orgtypeValid:'请先选择销售类型!',
guiderid:{
gid:'导购ID',
emname:'导购名称',
state:'状态',
role:'角色',
stateNo:'禁用',
stateYes:'可用',
roleOwner:'店长',
roleClerk:'店员',
roleElse:'其它'
}
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(tagKey,flag,actId){
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".crm-tag-conditional").show().layout({fit:true});
var button = initButton();// 初始化按钮
var tagForm = page.find(".custLevelDetail").find(".custLevelAddForm");
......@@ -58,14 +58,16 @@ define(function(){
var button = panel.find(".button");
button.rs_toolbar({
buttons:[{
text:resource.btn.submit,
text:base.resource.btn.submit,
iconCls:'btn-submit submit-condition',
handler:submitBtn
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
layout.panelRefresh();
}
}],
content:button.children('div.custLevelDetail')
});
......@@ -78,7 +80,7 @@ define(function(){
tagVal:tagForm.find(".tagVal").val()
}, function(result){
if(result.total!="0"){
$.messager.alert(resource.msg_title, resource.tag.exist);
$.messager.alert(base.resource.msg_title, resource.exist);
return false;
}
})
......@@ -101,7 +103,7 @@ define(function(){
if(result.total=="0"){
if(flag==0){
$.JSON("./tag/createTagVal.json",param, function(result){
if(responseUtils(result)){
if($.response(result)){
tagForm.find(".valId").val(result.value.valId);
returnJson();
$.JSON("./tag/addConditonalTag.json",{
......@@ -111,9 +113,9 @@ define(function(){
tagVal:tagForm.find(".tagVal").val(),
valDesc:tagForm.find(".valDesc").val()
}, function(result){
if(responseUtils(result)){
closeSelectedPanel();
panelRefreshUtils();
if($.response(result)){
layout.closeSelectedPanel();
layout.panelRefresh();
}
})
}
......@@ -127,14 +129,14 @@ define(function(){
tagVal:tagForm.find(".tagVal").val(),
valDesc:tagForm.find(".valDesc").val()
}, function(result){
if(responseUtils(result)){
closeSelectedPanel();
panelRefreshUtils();
if($.response(result)){
layout.closeSelectedPanel();
layout.panelRefresh();
}
});
}
}else{
$.messager.alert(resource.msg_title, resource.tag.exist);
$.messager.alert(base.resource.msg_title, resource.exist);
return false;
}
})
......@@ -262,7 +264,7 @@ define(function(){
data:{scope:"TAG_CONSUME"},
async:false,//同步
success:function(result) {
if(responseUtils(result)){
if($.response(result)){
for(var i=0;i<result.list.length;i++){
page.find(".condit").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>")
}
......@@ -276,7 +278,7 @@ define(function(){
data:{scope:"TAG_PROPERTY"},
async:false,//同步
success:function(result) {
if(responseUtils(result)){
if($.response(result)){
for(var i=0;i<result.list.length;i++){
page.find(".startChoice").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>")
}
......@@ -299,7 +301,7 @@ define(function(){
function selectSite(obj){
//根据CRM账套选择网点
showCondObject({id:'e0e0f773-34a1-450c-8868-60433a245eb8',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){
base.showCondObject({id:'e0e0f773-34a1-450c-8868-60433a245eb8',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){
return params;
// if(actId!=""){
// return params["c75b9a41-0c4f-463d-a028-45d8cffe6ff9"]=actId; //CRM账套
......@@ -326,7 +328,7 @@ define(function(){
siteId:siId,
type:0
},function(result){
if(responseUtils(result)){
if($.response(result)){
$(obj).prev().val(result.value.rngId);
$(obj).prev().prev().val(showNames);
}
......@@ -344,7 +346,7 @@ define(function(){
//根据CRM账套选择品牌
//22726b54-5748-4926-82ed-abe076caecfa
//dff2379d-5995-40d2-8d28-6c835ecdd955
showCondObject({id:'22726b54-5748-4926-82ed-abe076caecfa',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){
base.showCondObject({id:'22726b54-5748-4926-82ed-abe076caecfa',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){
// if(actId!=""){
// return params["c3d225ae-f99b-40ce-b09d-0e6014c2934b"]=actId; //当前账套ID
// }else{
......@@ -369,7 +371,7 @@ define(function(){
brandId:brId,
type:1
},function(result){
if(responseUtils(result)){
if($.response(result)){
$(obj).prev().val(result.value.rngId);
$(obj).prev().prev().val(showNames);
}
......
define(function(){
define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(tagKey,tagName){
var query = "564fc1d7-d790-4aea-9fc6-1cf23c94c9ee";
var condition = "02140c5b-5aa6-4c83-b16a-0a15335a4542";
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true});
page.layout("panel","center").children('.easyuiTabs').tabs({fit:true});
......@@ -17,7 +17,7 @@ define(function(){
var datagrid=initdatagrid(); //初始化调整datagrid
function datagridReload(param){
var param =getCondObjectValue(query);
var param =base.getCondObjectValue(query);
param[condition]=tagKey;
datagrid.datagrid("reload",param);
}
......@@ -33,43 +33,45 @@ define(function(){
},
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:tagName,
authz:getAuthzUtils('tag'),
authz:base.getAuthz('tag'),
content:page.find(".btn_opt"),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(query,datagridReload);
base.showCondObject(query,datagridReload);
}
},{
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
handler: addTagVal
},{
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
handler:editTagVal
},{
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
handler: removeTagVal
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
}]
}),
url:"./query/"+query+".json?"+condition+"="+tagKey,
fitColumns:true,
columns:[[
{field:'ck',checkbox:true},
{field:'VAL_ID',title:resource.tag.tagval.datagrid_col_val_id_title,width:80,align:'center'},
{field:'TAG_KEY',title:resource.tag.tagval.datagrid_col_tag_key_title,hidden:true},
{field:'TAG_VAL',title:resource.tag.tagval.datagrid_col_tag_val_title,width:150,align:'center'},
{field:'VAL_DESC',title:resource.tag.tagval.datagrid_col_val_desc_title,width:100,align:'center'},
{field:'ACT_NAME',title:resource.tag.tagkey.datagrid_col_act_name_title,width:150,align:'center'},
{field:'ENABLE',title:resource.tag.tagkey.datagrid_col_enable_title,width:60,align:'center',
{field:'VAL_ID',title:resource.tagval.datagrid_col_val_id_title,width:80,align:'center'},
{field:'TAG_KEY',title:resource.tagval.datagrid_col_tag_key_title,hidden:true},
{field:'TAG_VAL',title:resource.tagval.datagrid_col_tag_val_title,width:150,align:'center'},
{field:'VAL_DESC',title:resource.tagval.datagrid_col_val_desc_title,width:100,align:'center'},
{field:'ACT_NAME',title:resource.tagkey.datagrid_col_act_name_title,width:150,align:'center'},
{field:'ENABLE',title:resource.tagkey.datagrid_col_enable_title,width:60,align:'center',
formatter : function(value,row,index){
return value ==true ? '是':'否';
}
......@@ -80,12 +82,12 @@ define(function(){
function openTag(){
url = "./tag/customerTagInit?tagKey="+$(this).attr("data-option2")+"&valId="+$(this).attr("data-option1");
showTabUtils({text:"打标签",url:url}, true, function(){});
layout.showPanel({text:"打标签",url:url}, true, function(){});
}
function addTagVal(){ // 弹出dialog
url = "./tag/conditionalTag?flag=0&tagKey="+tagKey+"&valId=0";
showTabUtils({text:"设置条件标签值",url:url}, true, function(){});
layout.showPanel({text:"设置条件标签值",url:url}, true, function(){});
}
//关闭窗口
......@@ -106,19 +108,19 @@ define(function(){
function editTagVal(){ // 编辑
var row = selectRow();
if(row==null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
url = "./tag/conditionalTag?flag=1&tagKey="+row.tagKey+"&valId="+row.valId;
showTabUtils({text:"设置条件标签值",url:url}, true, function(){});
layout.showPanel({text:"设置条件标签值",url:url}, true, function(){});
}
}
function removeTagVal(){ // 删除
var row = selectRow();
if(row==null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
//判断是否有用户打过标签
$.ajax({
......@@ -127,15 +129,15 @@ define(function(){
data:{tagKey:row.tagKey,tagVal:row.valId},
async:false,//同步
success:function(result) {
if(responseUtils(result)){
if($.response(result)){
if(result.total==0){
$.post("./tag/deleteTagVal.json",row,function(result){
if(responseUtils(result)){
if($.response(result)){
datagrid.datagrid("reload");
}
});
}else{
$.messager.alert(resource.msg_title, resource.tag.repeat);
$.messager.alert(base.resource.msg_title, resource.repeat);
}
}
}
......
define(["uploadify"],function(){
define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index','uploadify'], function (resource, Class, moment, base, layout){
return {
init : function(tagKey,tagVal,valId,singleFlag,isEnable,sessionId,rootUrl){
var query = "2879197f-c95c-4d64-a4a9-5244910b0fc8";
var condition1 = "0a5372b9-dbfb-4958-83ae-7547085ab677";
var condition2 = "aef17dde-2a16-48d8-946f-1dd8bd5b5842";
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true});
page.layout("panel","center").children('.easyuiTabs').tabs({fit:true});
var datagrid=initdatagrid(); //初始化调整datagrid
......@@ -29,35 +29,37 @@ define(["uploadify"],function(){
return panel.find(".crm-staticTagVal-table").datagrid({
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:"标签值顾客列表",
authz:getAuthzUtils('tag'),
authz:base.getAuthz('tag'),
content:page.find(".btn_opt"),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(query,datagridReload);
}
},{
text:resource.btn.selCustomer,
text:base.resource.btn.selCustomer,
iconCls:'btn-add',
handler: selectCustomer
},{
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
handler: removeTagVal
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function(){
layout.panelRefresh();
}
},
{
text:resource.btn.downloadExcel,
text:base.resource.btn.downloadExcel,
iconCls:'btn-down',
handler:downloadExcel
},
{
text:resource.btn.addByFile,
text:base.resource.btn.addByFile,
id:'btn-tag-import',
iconCls:'btn-down'
}]
......@@ -84,7 +86,7 @@ define(["uploadify"],function(){
{field:'EMAIL',title:'邮箱',width:100,align:'center'},
{field:'REG_TIME',title:'入会时间',width:100,align:'center',
formatter: function(value,row,index){
return value?Date.parseDate(value).format("yyyy-MM-dd"):null;
return value?moment(value).format("YYYY-MM-DD HH:mm:ss"):null;
}
}
]]
......@@ -120,7 +122,7 @@ define(["uploadify"],function(){
//选择顾客
function selectCustomer(){
if(isEnable=="true"){
showCondObject({id:'ea9fc1d8-05b6-432f-a72f-a760f351bc7d',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){
base.showCondObject({id:'ea9fc1d8-05b6-432f-a72f-a760f351bc7d',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){
if(page.find(".thisActId").val()!=null&&page.find(".thisActId").val()!=""){
return params["80997a88-3910-11e6-8f1f-005056ba7dbc"]=page.find(".thisActId").val();
}else{
......@@ -162,11 +164,11 @@ define(["uploadify"],function(){
tagKey:tagKey,
valId:valId
},function(result){
if(responseUtils(result)){
if($.response(result)){
datagridReload();
if(failCstNum>0){
failCstId=failCstId.substring(0, failCstId.length-1);
$.messager.alert(resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+".");
$.messager.alert(base.resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+".");
}
}
});
......@@ -174,7 +176,7 @@ define(["uploadify"],function(){
datagridReload();
if(failCstNum>0){
failCstId=failCstId.substring(0, failCstId.length-1);
$.messager.alert(resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+".");
$.messager.alert(base.resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+".");
}
}
});
......@@ -184,7 +186,7 @@ define(["uploadify"],function(){
tagKey:tagKey,
valId:valId
},function(result){
if(responseUtils(result)){
if($.response(result)){
datagridReload();
}
});
......@@ -193,7 +195,7 @@ define(["uploadify"],function(){
}
});
}else{
$.messager.alert(resource.msg_title, "标签不可用,无法操作");
$.messager.alert(base.resource.msg_title, "标签不可用,无法操作");
}
}
......@@ -207,7 +209,7 @@ define(["uploadify"],function(){
}
function datagridReload(){
var param =getCondObjectValue(query);
var param =layout.getCondObjectValue(query);
param[condition1]=tagKey;
param[condition2]=valId;
datagrid.datagrid("reload",param);
......@@ -219,7 +221,7 @@ define(["uploadify"],function(){
function removeTagVal(){
var rows = datagrid.datagrid('getSelections');
if(rows.length>0){
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
var cstIds="";
for (var i = 0; i < rows.length; i++) {
......@@ -234,14 +236,14 @@ define(["uploadify"],function(){
tagVal:valId
};
$.post("./tag/deleteCustomerTags.json",params,function(result){
if(responseUtils(result)){
if($.response(result)){
datagrid.datagrid("reload");
}
});
}
});
}else{
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}
}
}
......
define(function(){
define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(searchCondition){
var query = "f920c7e0-9086-4fa6-92a9-50a2b41dd6dd"; // 标签列表
var condition = "9ef13b9a-005b-4d41-8b46-3129c0343d11"; // 平台和共享的过滤条件
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".crm-point-adjustment").show().layout({fit:true});
page.layout("panel","center").children('.easyuiTabs').tabs({fit:true});
var window = initWindow(); // 初始化添加页面
......@@ -26,7 +26,7 @@ define(function(){
html += "<li><span var_code="+data[i].varCode+" class=\"tag-sel\">"+data[i].varName+"</span></li>";
});
tempWin.dialog({
title:resource.tag.tagkey.addDialog.title,
title:resource.tagkey.addDialog.title,
width: 320,
height: 'auto',
closed: true,
......@@ -46,7 +46,7 @@ define(function(){
window.dialog("close");
var url = "";
url = "./tag/tagInfo?tagType="+tagType+"&flag=0&tagKey=0";
showTabUtils({text:resource.tag.tagkey.showTabUtils.addTitle,url:url}, true, function(){});
layout.showPanel({text:resource.tagkey.showTabUtils.addTitle,url:url}, true, function(){});
}
function selectRow(){ // 行转换
......@@ -60,17 +60,17 @@ define(function(){
function editTagVal(){ // 编辑
var row = crmTagDatagrid.datagrid("getSelected");
if(row==null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
url = "./tag/tagInfo?tagKey="+row.TAG_KEY+"&flag=1&tagType="+row.TAG_TYPE;
showTabUtils({text:resource.tag.tagkey.showTabUtils.editTitle,url:url}, true, function(){});
layout.showPanel({text:resource.tagkey.showTabUtils.editTitle,url:url}, true, function(){});
}
}
function removeTagVal(){ // 删除
var row = selectRow();
if(row==null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
/**
* 判断是否有用户打过标签
......@@ -81,19 +81,19 @@ define(function(){
data:{tagKey:row.tagKey},
async:false, // 同步
success:function(result) {
if(responseUtils(result)){
if($.response(result)){
if(result.total==0){
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
$.post("./tag/deleteTagKey.json",row,function(result){
if(responseUtils(result)){
if($.response(result)){
crmTagDatagrid.datagrid("reload");
}
});
}
});
}else{
$.messager.alert(resource.msg_title, resource.tag.repeat);
$.messager.alert(base.resource.msg_title, base.resource.tag.repeat);
}
}
}
......@@ -107,7 +107,7 @@ define(function(){
function datagridReload(params){
var item = page.find(".center").find(".btn_opt").find("li.tabs-selected");
var param =getCondObjectValue(query);
var param =base.getCondObjectValue(query);
crmTagDatagrid.datagrid("reload",param);
}
......@@ -117,7 +117,7 @@ define(function(){
showName=showName.substring(0,6)+"...";
}
url = "./tag/tagValList?tagKey="+$(this).attr("data-option1")+"&tagType="+$(this).attr("data-option2");
showTabUtils({text:showName,url:url}, true, function(){});
layout.showPanel({text:showName,url:url}, true, function(){});
}
function initcrmTagDatagrid(){
......@@ -128,47 +128,49 @@ define(function(){
buttons.unbind(".datagrid").bind("click.datagrid", openSetKeyVal);
},
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:resource.tag.tagkey.datagrid_title,
title:resource.tagkey.datagrid_title,
authz:getAuthzUtils('tag'),
content:page.find(".btn_opt"),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(query,datagridReload);
base.showCondObject(query,datagridReload);
}
},{
code:'add',
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
handler: newlBuild
},{
code:'edit',
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
handler:editTagVal
},{
code:'delete',
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
handler: removeTagVal
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
}]
}),
url:"./query/"+query+".json?"+condition+"="+searchCondition,
fitColumns:true,
columns:[[
{field:'ck',checkbox:true},
{field:'TAG_KEY',title:resource.tag.tagkey.datagrid_col_tag_key_title,width:80,align:'center'},
{field:'TAG_NAME',title:resource.tag.tagkey.datagrid_col_tag_name_title,width:150,align:'center'},
{field:'TAG_DESC',title:resource.tag.tagkey.datagrid_col_tag_desc_title,width:100,align:'center'},
{field:'TAG_KEY',title:resource.tagkey.datagrid_col_tag_key_title,width:80,align:'center'},
{field:'TAG_NAME',title:resource.tagkey.datagrid_col_tag_name_title,width:150,align:'center'},
{field:'TAG_DESC',title:resource.tagkey.datagrid_col_tag_desc_title,width:100,align:'center'},
// {field:'TAG_ACT',title:'账套ID',width:60,align:'center',hidden:true},
{field:'ACT_NAME',title:resource.tag.tagkey.datagrid_col_act_name_title,width:150,align:'center'},
{field:'TAG_TYPE',title:resource.tag.tagkey.datagrid_col_tag_type_title,width:60,align:'center',
{field:'ACT_NAME',title:resource.tagkey.datagrid_col_act_name_title,width:150,align:'center'},
{field:'TAG_TYPE',title:resource.tagkey.datagrid_col_tag_type_title,width:60,align:'center',
formatter : function(value,row,index){
switch(value){
case 0:
......@@ -184,8 +186,8 @@ define(function(){
return value;
}
},
{field:'ENABLE',title:resource.tag.tagkey.datagrid_col_enable_title,width:60,align:'center'},
{field:'OPERATION',title:resource.tag.tagkey.datagrid_col_operation_title,width:60,align:'center',
{field:'ENABLE',title:resource.tagkey.datagrid_col_enable_title,width:60,align:'center'},
{field:'OPERATION',title:resource.tagkey.datagrid_col_operation_title,width:60,align:'center',
formatter: function(val,row,index) {
if(row.TAG_TYPE==2){
return null;
......
define({
root: {
tagkey:{
datagrid_title:'顾客标签',
datagrid_col_tag_key_title:'编号',
datagrid_col_tag_name_title:'名称',
datagrid_col_tag_desc_title:'描述',
datagrid_col_act_name_title:'适用CRM账套',
datagrid_col_tag_type_title:'类型',
datagrid_col_enable_title:'可用',
datagrid_col_operation_title:'操作',
showTabUtils:{
addTitle:'新增标签页面',
editTitle:'新增标签页面'
},
addDialog:{
title:'选择新建类型'
}
},
tagval:{
datagrid_col_val_id_title:'编号',
datagrid_col_tag_key_title:'标签ID',
datagrid_col_tag_val_title:'名称',
datagrid_col_val_desc_title:'描述'
},
repeat:'已有用户打过标签,不允许删除',
exist:'标签值已存在'
},
"en-US": true,
"en-US-paris": true
});
\ No newline at end of file
define(function(){
define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){
return {
init : function(tagKey,tagName){
var query = "564fc1d7-d790-4aea-9fc6-1cf23c94c9ee";
var condition = "02140c5b-5aa6-4c83-b16a-0a15335a4542";
var panel = getSelectedPanel();
var panel = layout.getSelectedPanel();
var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true});
page.layout("panel","center").children('.easyuiTabs').tabs({fit:true});
var tagValDialog = initTagValDialog();//初始化添加页面
......@@ -11,7 +11,7 @@ define(function(){
var datagrid=initdatagrid(); //初始化调整datagrid
function datagridReload(param){
var param =getCondObjectValue(query);
var param =layout.getCondObjectValue(query);
param[condition]=tagKey;
datagrid.datagrid("reload",param);
}
......@@ -25,48 +25,50 @@ define(function(){
},
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
title:tagName,
authz:getAuthzUtils('tag'),
authz:base.getAuthz('tag'),
content:page.find(".btn_opt"),
buttons:[{
text:resource.btn.select,
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
showCondObject(query,datagridReload);
base.showCondObject(query,datagridReload);
}
},{
text:resource.btn.add,
text:base.resource.btn.add,
iconCls:'btn-add',
handler: newlBuild
},{
text:resource.btn.edit,
text:base.resource.btn.edit,
iconCls:'btn-edit',
handler:editTagVal
},{
text:resource.btn.remove,
text:base.resource.btn.remove,
iconCls:'btn-remove',
handler: removeTagVal
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function () {
layout.panelRefresh();
}
}]
}),
url:"./query/"+query+".json?02140c5b-5aa6-4c83-b16a-0a15335a4542="+tagKey,
fitColumns:true,
columns:[[
{field:'ck',checkbox:true},
{field:'VAL_ID',title:resource.tag.tagval.datagrid_col_val_id_title,width:80,align:'center'},
{field:'TAG_KEY',title:resource.tag.tagval.datagrid_col_tag_key_title,hidden:true},
{field:'TAG_VAL',title:resource.tag.tagval.datagrid_col_tag_val_title,width:150,align:'center'},
{field:'VAL_DESC',title:resource.tag.tagval.datagrid_col_val_desc_title,width:100,align:'center'},
{field:'ACT_NAME',title:resource.tag.tagkey.datagrid_col_act_name_title,width:150,align:'center'},
{field:'ENABLE',title:resource.tag.tagkey.datagrid_col_enable_title,width:60,align:'center',
{field:'VAL_ID',title:resource.tagval.datagrid_col_val_id_title,width:80,align:'center'},
{field:'TAG_KEY',title:resource.tagval.datagrid_col_tag_key_title,hidden:true},
{field:'TAG_VAL',title:resource.tagval.datagrid_col_tag_val_title,width:150,align:'center'},
{field:'VAL_DESC',title:resource.tagval.datagrid_col_val_desc_title,width:100,align:'center'},
{field:'ACT_NAME',title:resource.tagkey.datagrid_col_act_name_title,width:150,align:'center'},
{field:'ENABLE',title:resource.tagkey.datagrid_col_enable_title,width:60,align:'center',
formatter : function(value,row,index){
return value ==true ? '是':'否';
}
},
{field:'OPERATION',title:resource.tag.datagrid_col_operation_title,width:100,align:'center',
{field:'OPERATION',title:resource.datagrid_col_operation_title,width:100,align:'center',
formatter: function(val,row,index) {
return '<a href="javascript:void(0);" class="data-setpoint-a" data-option1="'+ row.VAL_ID +'" data-option2="'+row.TAG_KEY+'" >打标签</a>';
}
......@@ -77,7 +79,7 @@ define(function(){
function openPointRule(){
url = "./tag/customerTagInit?tagKey="+$(this).attr("data-option2")+"&valId="+$(this).attr("data-option1");
showTabUtils({text:"打标签",url:url}, true, function(){});
layout.showPanel({text:"打标签",url:url}, true, function(){});
}
function newlBuild(){ // 弹出dialog
......@@ -101,7 +103,7 @@ define(function(){
editBtn();
}
}
},{text:resource.btn.cancel,handler:hideWindow}],
},{text:base.resource.btn.cancel,handler:hideWindow}],
closed:true,
width:'500',
height:'auto'
......@@ -123,13 +125,13 @@ define(function(){
$.JSON("./tag/existsTagValName.json",param, function(result){
if(result.total=="0"){
$.JSON("./tag/createTagVal.json",param,function(result){
if(responseUtils(result)){
if($.response(result)){
hideWindow();
datagrid.datagrid("reload");
}
});
}else{
$.messager.alert(resource.msg_title, resource.tag.exist);
$.messager.alert(base.resource.msg_title, resource.exist);
return false;
}
})
......@@ -149,13 +151,13 @@ define(function(){
$.JSON("./tag/existsTagValName.json",param, function(result){
if(result.total=="0"){
$.JSON("./tag/updateTagVal.json",param,function(result){
if(responseUtils(result)){
if($.response(result)){
hideWindow();
datagrid.datagrid("reload");
}
});
}else{
$.messager.alert(resource.msg_title, resource.tag.exist);
$.messager.alert(base.resource.msg_title, resource.exist);
return false;
}
})
......@@ -174,7 +176,7 @@ define(function(){
function editTagVal(){ // 编辑
var row = selectRow();
if(row==null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
$.messager.alert(base.resource.msg_title, base.resource.msgEditTip);
}else{
var form = tagValDialog.find(".editTagValForm");
form.find("input[name='id']").val(row.valId);
......@@ -190,7 +192,7 @@ define(function(){
function removeTagVal(){ // 删除
var row = selectRow();
if(row==null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
$.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip);
}else{
/**
* 判断是否有用户打过标签
......@@ -201,19 +203,19 @@ define(function(){
data:{tagKey:row.tagKey,tagVal:row.valId},
async:false, // 同步
success:function(result) {
if(responseUtils(result)){
if($.response(result)){
if(result.total==0){
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
$.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){
if(r){
$.post("./tag/deleteTagVal.json",row,function(result){
if(responseUtils(result)){
if($.response(result)){
datagrid.datagrid("reload");
}
});
}
});
}else{
$.messager.alert(resource.msg_title, resource.tag.repeat);
$.messager.alert(base.resource.msg_title, resource.repeat);
}
}
}
......
This diff is collapsed. Click to expand it.