機能:GFP定義作成ツール

grid for Pleasanter機能

grid for PleasanterのGFP定義を作成するツールについて説明します。

概要

  • GFP定義作成ツールはExcelでGFP定義情報を作成するツールです。
  • GFP定義後、GFP定義作成ボタンクリックでGFP定義情報(JSON)が出力されます。
  • また、カスタムサイトで新規レコード作成時に初期表示データを表示させたい場合はGFP定義後、初期データ作成行出力ボタンで初期表示データ作成用の行が作成されます。初期表示データを登録後、GFP定義作成ボタンクリックで初期表示データ付でGFP定義情報(JSON)が出力されます。
  • HTML・CSSが理解できる方であれば誰でも作成できます。

GFP定義(JSON)

キー仕様
siteGFP実装サイトに関する定義
tableテーブル操作に関する定義
cellセル操作に関する定義
actionsアクション操作に関する定義
columnsカラム定義
postbackポストバック定義
initial_data初期表示データ定義
{
  "site":{},
  "table":{},
  "cell":{},
  "actions":{},
  "columns":[],
  "postback":[],
  "initial_data":[]
}

GFP定義:site

キー仕様
id123456GFP実装サイトID“id”:”123456″
name見積書GFP実装サイト名“name”:”見積書”
itemDescriptionAGFP実装項目
※説明項目を指定
“item”:”DescriptionA”
gfp見積明細GFP実装項目名“gfp”:”見積明細”
description見積明細をGFPで実装説明等“description”:”見積明細をGFPで実装”
{
  "site":{"id":"123456","name":"見積書","item":"DescriptionA","gfp":"見積明細","description":"見積明細をGFPで実装"},
}

GFP定義:table

キー仕様
scroll_rows10縦スクロール表示行数
1以上指定
※詳細はコチラを参照
“scroll_rows”:”10″
scroll_modescroll
wrap
横スクロール表示
折り返し表示
※未指定時はwrap
※詳細はコチラを参照
“scroll_mode”:”scroll”
{
  "table":{"scroll_rows":"10","scroll_mode":"scroll"},
}

GFP定義:cell

キー仕様
bordersolid;セルの線
※詳細はコチラを参照
“border”:”solid;”
padding0;余白
※詳細はコチラを参照
“padding”:”0;”
{
  "cell":{"border":"solid;","padding":"0;"},
}

GFP定義:columns

キー仕様
nameitem-noユニーク制約“name”:”item-no”
label品番ヘッダーラベル“label”:”品番”
typetextHTML要素のinputtextareaselectとGFP独自要素
※詳細はコチラを参照
“type”:”text”
requiredtruetrue:必須“required”:true
readonlytruetrue:読取専用“readonly”:true
value100初期値“value”:”100″
disabledtruetrue:無効化“disabled”:true
options[“”,”本”,”冊”,”箱”]type:select時の選択リスト“options”:
[“”,”本”,”冊”,”箱”]
data-formatY/m/d H:i:stype:gfp_date、gfp_datetime選択時の日時フォーマット
※後述します
“data-format”:”Y/m/d H:i:s
sumtarget“amount”,”tax”type:gfp_sum選択時の合計対象列
※詳細はコチラを参照
“sumtarget”:[“amount”,”tax”]
calculationquantity * unit-pricetype:gfp_calc選択時の計算式
※詳細はコチラを参照
“calculation”:”quantity * unit-price
totalsum
count
合計行(集計)
合計行(カウント)
※詳細はコチラを参照
“total”:”sum”
Keyitem-noルックアップキー
Key=Match
※詳細はコチラを参照
lookup”:{“Key”:[“gfp-item-no”]}
Result“item-name”,”unit-price”ルックアップ検索結果
Result=Target
※詳細はコチラを参照
lookup”:{“Result”:[“item-name”,””unit-price”]}
SiteId92054ルックアップサイトID
※詳細はコチラを参照
lookup”:{“SiteId”:”92054″}
TableNameUsers
Groups
Depts
ルックアップ標準サイト
※詳細はコチラを参照
lookup”:{“TableName”:”Users”}
Match“Title”ルックアップサイトキー
Key=Match
※詳細はコチラを参照
lookup”:{“Match”:[“Title”]}
Targetルックアップサイト検索結果
Result=Target
※詳細はコチラを参照
lookup”:{“Target”:[“ClassB”,”NumB”]}
attributes“rows”:”5″,”cols”:”33″HTML要素のinputtextareaselectの属性
※詳細はコチラを参照
“rows”:”5″,”cols”:”33″
globalAttributes“draggable”:trueHTML要素のグローバル属性
※詳細はコチラを参照
“draggable”:true
headerStyletext-align: center;ヘッダーのCSS
※詳細はコチラを参照
“headerStyle”:”text-align: center;”
stylebackground-color: red; color: white;セルのCSS
※詳細はコチラを参照
“style”:”background-color: red; color: white;”
{
  "columns":[
    {"name":"item-no","label":"品番","type":"text","lookup":{"Key":["item-no"],"Result":["item-name","unit","unit-price"],"SiteId":"92054","Match":["Title"],"Target":["ClassB","ClassC","NumB"]},"headerStyle":"text-align: center;","style":"text-align: center;"},
    {"name":"item-name","label":"品名","type":"text","required":true,"readonly":true,"headerStyle":"text-align: center;","style":"text-align: center;"},
    {"name":"quantity","label":"数量","type":"number","required":true,"headerStyle":"text-align: center;","style":"text-align: right;"},
    {"name":"unit","label":"単位","type":"select","required":true,"readonly":true,"options":["","本","冊","個","箱"],"headerStyle":"text-align: center;","style":"text-align: right;"},
    {"name":"unit-price","label":"単価","type":"number","required":true,"readonly":true,"headerStyle":"text-align: center;","style":"text-align: right;"},
    {"name":"gfp-amount","label":"金額","type":"gfp_calc","required":true,"readonly":true,"calculation":"quantity * unit-price","total":"sum","headerStyle":"text-align: center;","style":"text-align: right;"},
    {"name":"tax","label":"消費税","type":"gfp_calc","required":true,"readonly":true,"calculation":"amount * 0.1","total":"sum","headerStyle":"text-align: center;","style":"text-align: right;"},
    {"name":"sum","label":"合計","type":"gfp_sum","required":true,"readonly":true,"sumtarget":["amount","tax"],"total":"sum","headerStyle":"text-align: center;","style":"text-align: right;"}
}

GFP定義:postback

キー仕様
fromamount参照元
row1
total
from項目の行番号
from項目の合計行
toClassAポストバック先項目
※詳細はコチラを参照
{
  "postback":[
    ["amount","1","ClassA"],
    ["amount","total","ClassB"]
  ],
}

GFP定義:initial_data

キー仕様
columnsのnameデータ初期表示データ作成
※詳細はコチラを参照
{
  "initial_data":[
    {
      "item-no":"10001",
      "item-name":"A4用紙(500枚)",
      "quantity":"10",
      "unit":"箱",
      "unit-price":"100",
    },
      "item-no":"10002",
      "item-name":"A5用紙(500枚)",
      "quantity":"20",
      "unit":"箱",
      "unit-price":"100",
    }
}

GFP定義:日付フォーマット

  • data-formatで指定できる日時フォーマットです。
種別フォーマット説明
d日付の数値(2桁、ゼロ埋め有り)01~31
j日付の数値(ゼロ埋め無し)1~31
D曜日のテキスト値(省略形)月~日、Mon~Sun
l(小文字のL)曜日のテキスト値(フルスペル)月曜~日曜、Monday~Sunday
m月の数値(2桁、ゼロ埋め有り)01~12
n月の数値(ゼロ埋め無し)1~12
M月のテキスト値(省略形)1月~12月、Jan~Dec
F月のテキスト値(フルスペル)1月~12月、January~December
Y年の数値(4桁)1970、1999、2007等
y年の数値(2桁)70、99、07等
時刻a
午前または午後(小文字)


am、pm
A午前または午後(大文字)AM、PM
g時の数値(12時間単位、ゼロ埋め無し)1~12
G時の数値(24時間単位、ゼロ埋め無し)0~23
h時の数値(12時間単位、2桁、ゼロ埋め有り)01~12
H時の数値(24時間単位、2桁、ゼロ埋め有り)00~23
i分の数値(2桁、ゼロ埋め有り)00~59
s秒の数値(2桁、ゼロ埋め有り)00~59
uマイクロ秒の数値(6桁)654321

タイトルとURLをコピーしました