12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- * Created by TT on 2017/8/28.
- */
- ;
- spa_define(function () {
- return $.use(["spa", "pagedatagrid", "util"], function (spa, pdgf, util) {
- return {
- main: function () {
- var root = spa.findInMain(".sys_disbanner_index");
- var pdg = pdgf.build(root);
- pdg.code.shell("showDay", function (env) {
- if (env.cd && env.cd[this.k]) {
- var day = env.cd[this.k];
- return day.substring(0, 4) + "年" + day.substring(4, 6) + "月" + day.substring(6, 8) + "日 " + day.substring(8, 10) + ":" + day.substring(10, 12);
- }
- return "";
- });
- pdg.code.listen($.dict.doTransfer);
- root.find(".opt-query").on("click", function () {
- pdg.load();
- });
- pdg.load();
- root.find(".dt-tpl").on("click", "th.opt-check>i.icon-st-check", function () {
- var $this = $(this);
- $this.toggleClass("checked");
- if ($this.hasClass("checked")) {
- root.find(".dt-tpl td.opt-check>i.icon-st-check").addClass("checked");
- } else {
- root.find(".dt-tpl td.opt-check>i.icon-st-check").removeClass("checked");
- }
- });
- root.find(".dt-tpl").on("click", "td.opt-check>i.icon-st-check", function () {
- var $this = $(this);
- $this.toggleClass("checked");
- });
- root.find(".opt-insert").on("click", function() {
- spa.showModal("sys_disbanner_insert", function () {
- pdg.reload()
- });
- });
- root.find(".opt-putup").on("click", function () {
- spa.showModal("sys_disbanner_putup", function () {
- pdg.reload()
- });
- });
-
-
-
-
-
- }, mainDestory: function () {
- }
- };
- });
- });
|