refactor(PosmasterNo): replace formatPosmasterNo

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-06-05 10:57:37 +07:00
parent 6b2d1781b0
commit 34f33e57ac
25 changed files with 152 additions and 58 deletions

View file

@ -7,6 +7,7 @@ import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useStructureTree } from "@/stores/structureTree";
import { formatPosmasterNo } from "@/utils/function";
import type { QTableProps } from "quasar";
import type {
@ -263,12 +264,12 @@ async function getDataTable(id: string, level: number = 0) {
const listPosNo: DataPositionNo[] = dataMain.map((e: PositionMain) => ({
id: e.id,
isPosition: e.isPosition,
posMasterNo:
e.orgShortname +
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
" " +
e.posMasterNo +
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
posMasterNo: formatPosmasterNo(
e.orgShortname,
e.posMasterNoPrefix,
e.posMasterNo.toString(),
e.posMasterNoSuffix
),
positionName: e.positionName,
posTypeName: e.posTypeName,
posLevelName: e.posLevelName,