提交 460a4fa0 authored 作者: zgy's avatar zgy

修改首页轮播图功能

上级 e39f8c78
......@@ -57,8 +57,8 @@
<Form-item label="是否支持浏览" prop="scanFlag">
<i-input v-model="tbCfHomePage.scanFlag" placeholder="是否支持浏览"/>
</Form-item>
<Form-item label="是否跳转" prop="redirectFlag">
<i-input v-model="tbCfHomePage.redirectFlag" placeholder="是否跳转"/>
<Form-item label="跳转页面" prop="redirectFlag">
<i-input v-model="tbCfHomePage.redirectFlag" placeholder="跳转页面"/>
</Form-item>
<Form-item label="是否可用" prop="enableFlag">
<i-input v-model="tbCfHomePage.enableFlag" placeholder="是否可用"/>
......
......@@ -487,15 +487,15 @@ linkFormat = function (cellvalue, options, rowObject) {
* @returns {string}
*/
sexFormat = function (cellvalue) {
/* var returnStr = "未知";
if (!!cellvalue) {
if (cellvalue == '0') {
returnStr = "男";
} else if (cellvalue == '1') {
returnStr = "女";
}
}*/
return cellvalue==0?'男':'女';
/* var returnStr = "未知";
if (!!cellvalue) {
if (cellvalue == '0') {
returnStr = "男";
} else if (cellvalue == '1') {
returnStr = "女";
}
}*/
return cellvalue == 0 ? '男' : '女';
};
moneyFormat = function (cellvalue) {
......@@ -507,25 +507,25 @@ moneyFormat = function (cellvalue) {
returnStr = "女";
}
}*/
return '$'+cellvalue;
return '$' + cellvalue;
};
/**
* 优惠券类型翻译
* @param cellvalue
*/
couponFormat = function (cellvalue){
var returnStr="未知"
if(!!cellvalue||cellvalue=='0'){
if(cellvalue=='10'){
returnStr="购物返券";
}else if(cellvalue=='20'){
returnStr="注册返券";
}else if(cellvalue=='30'){
returnStr="邀请返券";
}else if(cellvalue=='40'){
returnStr="用户领券";
}else if(cellvalue=='50'){
returnStr="发放优惠券";
couponFormat = function (cellvalue) {
var returnStr = "未知"
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "购物返券";
} else if (cellvalue == '20') {
returnStr = "注册返券";
} else if (cellvalue == '30') {
returnStr = "邀请返券";
} else if (cellvalue == '40') {
returnStr = "用户领券";
} else if (cellvalue == '50') {
returnStr = "发放优惠券";
}
}
return returnStr;
......@@ -537,7 +537,7 @@ couponFormat = function (cellvalue){
*/
stateFormat = function (cellvalue) {
var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '0') {
returnStr = "无效";
} else if (cellvalue == '1') {
......@@ -564,7 +564,7 @@ statusFormat = function (cellvalue) {
*/
validFormat = function (cellvalue) {
let returnStr = "未知"
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '0') {
returnStr = "否";
} else if (cellvalue == '1') {
......@@ -576,7 +576,7 @@ validFormat = function (cellvalue) {
sortFormat = function (cellvalue) {
let returnStr = "未知"
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '0') {
returnStr = "安卓";
} else if (cellvalue == '1') {
......@@ -593,7 +593,7 @@ sortFormat = function (cellvalue) {
*/
enableFormat = function (cellvalue) {
let returnStr = "未知"
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '1') {
returnStr = "发放";
} else if (cellvalue == '2') {
......@@ -621,7 +621,7 @@ useFormat = function (cellvalue) {
*/
orderStatusFormat = function (cellvalue) {
var returnStr = "未知";
if(!!cellvalue) {
if (!!cellvalue) {
if (cellvalue == '0') {
returnStr = "取消";
} else if (cellvalue == '10') {
......@@ -647,7 +647,7 @@ orderStatusFormat = function (cellvalue) {
*/
payStatusFormat = function (cellvalue) {
var returnStr = "未支付";
if (!!cellvalue||cellvalue == '10') {
if (!!cellvalue || cellvalue == '10') {
if (cellvalue == '20') {
returnStr = "已支付";
}
......@@ -660,15 +660,15 @@ payStatusFormat = function (cellvalue) {
* @returns {string}
*/
deliveryFlagFormat = function (cellvalue) {
var returnStr="待采购"
if(!!cellvalue||cellvalue == '0'){
var returnStr = "待采购"
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "已代购";
} else if (cellvalue == '20') {
returnStr = "已到达中国仓";
}else if (cellvalue == '40') {
} else if (cellvalue == '40') {
returnStr = "已到达非洲仓";
}else if (cellvalue == '50') {
} else if (cellvalue == '50') {
returnStr = "买家已签收";
}
}
......@@ -681,7 +681,7 @@ deliveryFlagFormat = function (cellvalue) {
*/
userTypeFormat = function (cellvalue) {
var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '1') {
returnStr = "邮箱";
} else if (cellvalue == '2') {
......@@ -700,23 +700,39 @@ userTypeFormat = function (cellvalue) {
yesOrNoFormat = function (cellvalue) {
var returnStr;
if (cellvalue == '1') {
returnStr = "是";
} else {
returnStr = "否";
}
if (cellvalue == '1') {
returnStr = "是";
} else {
returnStr = "否";
}
return returnStr;
};
/**
* 跳转页面
* @param cellvalue
*/
pageFormat = function (cellvalue) {
var returnStr = "未知";
if (cellvalue == '0') {
returnStr = "无";
} else if (cellvalue == '1') {
returnStr = "购物网站页面";
} else if (cellvalue == '2') {
returnStr = "外链";
}
return returnStr;
};
/**
* 代购翻译
* @param cellvalue
*/
agentFormat = function (cellvalue) {
var returnStr = "未代购";
if (!!cellvalue||cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "已代购";
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "已代购";
}
}
return returnStr;
......@@ -735,7 +751,7 @@ contentFormat = function (cellvalue, options, rowObject) {
*/
userStatusFormat = function (cellvalue, options, rowObject) {
var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "未下单的用户";
} else if (cellvalue == '20') {
......@@ -750,14 +766,14 @@ userStatusFormat = function (cellvalue, options, rowObject) {
};
userLevelFormat = function (cellvalue, options, rowObject) {
var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') {
if (!!cellvalue || cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "1";
} else if (cellvalue == '20') {
returnStr = "2";
} else if (cellvalue == '30') {
returnStr = "3";
}else if (cellvalue == '40') {
} else if (cellvalue == '40') {
returnStr = "4";
}
}
......
......@@ -8,7 +8,7 @@ $(function () {
{label: '跳转链接', name: 'linkUrl', index: 'link_url', width: 100,formatter:linkFormat},
{label: '图片', name: 'imgUrl', index: 'img_url', width: 80,formatter: imageFormat},
{label: '是否支持浏览', name: 'scanFlag', index: 'scan_flag', width: 80,formatter: yesOrNoFormat},
{label: '是否跳转', name: 'redirectFlag', index: 'redirect_flag', width: 80,formatter: yesOrNoFormat},
{label: '跳转页面', name: 'redirectFlag', index: 'redirect_flag', width: 80,formatter: pageFormat},
{label: '是否可用', name: 'enableFlag', index: 'enable_flag', width: 80,formatter: yesOrNoFormat}]
});
});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论