0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

rex0220 計算式プラグイン スペース項目の概要印刷

Posted at

計算式プラグイン項目検証プラグインでスペース項目にレコードの概要を表示・印刷してみます。

概要

rex0220 計算式プラグイン スペース項目にレコードの概要表示で、表示した内容を印刷します。
項目検証プラグインで、スペース以外の項目を非表示にします。

  • 画面表示と印刷表示

2025-02-11_17h18_04.png

  • 印刷イメージ

2025-02-11_17h20_05.png

計算式プラグイン設定

印刷のため、横幅の設定を変更しています。
.custom-table { width: 100%;...

2025-02-11_17h24_15.png

.js
OPTION: 

// sp1:(sp1) SPACER
LET(
  label, TAGS_HTML(
    TAG("style", JOIN(ARRAY(
        ".custom-table { width: 100%; table-layout: auto; border-collapse: collapse; }",
        ".custom-table td { border: 1px solid darkgray; padding: 4px 6px; }",
        ".custom-table td:first-child { white-space: nowrap; color: blue; }",
        ".custom-table td:last-child { word-break: break-word; }",
    ), NEWLINE(),1)),
    TAG("div", "概要")
  ),
  table, TAGS_HTML(
  TAG("table", 
    ATTR("class", "custom-table "),
    STYLE("border-collapse", "collapse"),
    TAG("tr", TAG("td", "顧客名"), TAG("td", 顧客名)),
    TAG("tr", TAG("td", "部署名"), TAG("td", 部署名)),
    TAG("tr", TAG("td", "担当者名"), TAG("td", 担当者名)),
    TAG("tr", TAG("td", "案件名"), TAG("td", 案件名)),
    TAG("tr", TAG("td", "確度"), TAG("td", 確度)),
    TAG("tr", TAG("td", "初回商談日"), TAG("td", DATE_FORMAT(初回商談日),
      IF(NOT(初回商談日),STYLE("background-color:#f9bba5;")))),
    TAG("tr", TAG("td", "提案プラン"), TAG("td", 提案プラン)),
    TAG("tr", TAG("td", "オプション"), TAG("td", オプション)),
    TAG("tr", TAG("td", "商談担当者"), TAG("td", 商談担当者)),
    TAG("tr", TAG("td", "プラン費用"), TAG("td", FIXED(プラン費用),
      STYLE("text-align:right;"), IF(プラン費用>1000000,STYLE("color:red;")))),
    TAG("tr", TAG("td", "オプション費用"), TAG("td", FIXED(オプション費用),
      STYLE("text-align:right;"), IF(オプション費用>1000000,STYLE("color:red;")))),
    TAG("tr", TAG("td", "合計費用"), TAG("td", FIXED(合計費用),
      STYLE("text-align:right;"), IF(合計費用>1000000,STYLE("color:red;")))),
    TAG("tr", TAG("td", "受注予定日"), TAG("td", DATE_FORMAT(受注予定日))),
    TAG("tr", TAG("td", "詳細"), TAG("td", 詳細)),
  )),
  ARRAY(label,"",table,"")
)

項目検証プラグイン設定

スペース項目以外の項目を印刷時は非表示にします。
EV_INFO("cate")="print"

※非表示にする項目欄をまとめて選択して、「EV_INFO("cate")="print"」をコピペできます。

2025-02-11_17h26_54.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?