サービスレポート・出張経費精算入力の修正

This commit is contained in:
hsueh chiahao
2026-03-02 16:40:47 +08:00
parent e12216e6bc
commit b4266c864a
2 changed files with 56 additions and 7 deletions

View File

@@ -1,6 +1,25 @@
(function () {
"use strict";
/**
* 新規登録・編集画面保存時の処理
* engineer_mechanicに複数のユーザーが設定されている場合は、エラーを表示して保存をキャンセルする
*/
kintone.events.on(
["app.record.create.submit", "app.record.edit.submit"],
function (event) {
const record = event.record;
// engineer_mechanicに複数のユーザーが設定されている場合は、エラーを表示して保存をキャンセル
if (record.engineer_mechanic.value.length > 1) {
event.error = "engineer/mechanicにユーザーが複数設定されています";
return event;
}
return event;
}
);
/**
* 一覧画面の編集保存時の処理
*/