作者 王智

RSA1

... ... @@ -279,4 +279,10 @@ class Cards extends Backend
$mobile = substr_replace($mobile, $replaceStr, $start - 1, $countStr + 1);
return $mobile;
}
//下载模板
public function uploadmoban()
{
return 'http://yinhang.t.brotop.cn/oHXMeQEklz.php/goods?ref=addtabs';
}
}
... ...
... ... @@ -37,14 +37,29 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
operate: 'RANGE',
addclass: 'datetimerange',
formatter: Table.api.formatter.datetime
},
{
// field: 'operate',
// title: __('Operate'),
// table: table,
// events: Table.api.events.operate,
// formatter: Table.api.formatter.operate
buttons: [
{
name: 'moban',
text: __('下载导入模板'),
title: __('下载导入模板'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-angellist',
url: 'Cards/uploadmoban',
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
}
]
}
// {
// field: 'operate',
// title: __('Operate'),
// table: table,
// events: Table.api.events.operate,
// formatter: Table.api.formatter.operate
// }
]
]
});
... ...