dsh-workbench-salary 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +2270 -1213
- package/lib/db/db.js +6 -2
- package/lib/domain/actions.js +12 -9
- package/lib/domain/model.js +25 -0
- package/lib/domain/salary.js +80 -4
- package/lib/index.js +3 -3
- package/package.json +2 -2
package/lib/db/db.js
CHANGED
|
@@ -14,6 +14,7 @@ const DDL = [
|
|
|
14
14
|
pay_date TEXT NOT NULL,
|
|
15
15
|
income_period TEXT,
|
|
16
16
|
cycle TEXT NOT NULL DEFAULT 'monthly',
|
|
17
|
+
employment_type TEXT,
|
|
17
18
|
${MONEY_FIELDS.map((f) => f.column + " REAL NOT NULL DEFAULT 0").join(",\n ")},
|
|
18
19
|
note TEXT NOT NULL DEFAULT '',
|
|
19
20
|
created_at INTEGER NOT NULL,
|
|
@@ -30,12 +31,15 @@ export function ensureSchema(db) {
|
|
|
30
31
|
if (!db.prepare("PRAGMA table_info(salary_record)").all().some((col) => col.name === "income_period")) {
|
|
31
32
|
db.exec("ALTER TABLE salary_record ADD COLUMN income_period TEXT");
|
|
32
33
|
}
|
|
34
|
+
if (!db.prepare("PRAGMA table_info(salary_record)").all().some((col) => col.name === "employment_type")) {
|
|
35
|
+
db.exec("ALTER TABLE salary_record ADD COLUMN employment_type TEXT");
|
|
36
|
+
}
|
|
33
37
|
db.exec("CREATE INDEX IF NOT EXISTS idx_salary_income_period ON salary_record(income_period)");
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
export function salaryRow(r) {
|
|
37
41
|
if (!r) return null;
|
|
38
|
-
const out = { id: r.id, payDate: r.pay_date, incomePeriod: r.income_period ?? null, cycle: r.cycle };
|
|
42
|
+
const out = { id: r.id, payDate: r.pay_date, incomePeriod: r.income_period ?? null, cycle: r.cycle, employmentType: r.employment_type ?? null };
|
|
39
43
|
for (const field of MONEY_FIELDS) out[field.key] = Number(r[field.column]) || 0;
|
|
40
44
|
out.note = r.note || "";
|
|
41
45
|
out.createdAt = r.created_at;
|
|
@@ -44,4 +48,4 @@ export function salaryRow(r) {
|
|
|
44
48
|
return out;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
export const COLUMNS = ["id", "pay_date", "income_period", "cycle", ...MONEY_COLUMNS, "note", "created_at", "updated_at", "rev"];
|
|
51
|
+
export const COLUMNS = ["id", "pay_date", "income_period", "cycle", "employment_type", ...MONEY_COLUMNS, "note", "created_at", "updated_at", "rev"];
|
package/lib/domain/actions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** 工资 action:读、写都允许 agent(用户口述后可直接落库);数据页查询仅 UI。 */
|
|
2
|
-
import { MONEY_FIELDS } from "./model.js";
|
|
2
|
+
import { EMPLOYMENT_VALUES, MONEY_FIELDS } from "./model.js";
|
|
3
3
|
import { COLUMNS } from "../db/db.js";
|
|
4
4
|
|
|
5
5
|
const obj = (properties, required = []) => ({ type: "object", properties, required, additionalProperties: false });
|
|
@@ -64,15 +64,16 @@ export function registerSalaryActions(api, salary) {
|
|
|
64
64
|
execute: (args) => salary.stats({ year: args.year, basis: args.basis }),
|
|
65
65
|
});
|
|
66
66
|
action("salary.recordList", {
|
|
67
|
-
description: "
|
|
67
|
+
description: "只读:按日期倒序列出工资记录,可按年、日期区间、结算方式、用工类型筛选",
|
|
68
68
|
input: obj({
|
|
69
69
|
year: num("只取该年(按发薪日期)"),
|
|
70
70
|
from: str("开始日期 YYYY-MM-DD(含)"),
|
|
71
71
|
to: str("结束日期 YYYY-MM-DD(含)"),
|
|
72
|
-
cycle: { type: "string", enum: ["monthly", "daily"], description: "
|
|
72
|
+
cycle: { type: "string", enum: ["monthly", "daily"], description: "结算方式:月结 / 日结" },
|
|
73
|
+
employmentType: { type: "string", enum: EMPLOYMENT_VALUES, description: "用工类型:临时/兼职/外快/实习/试用/正式(temp/parttime/side/intern/probation/regular)" },
|
|
73
74
|
limit: num("1–500,默认 200"),
|
|
74
75
|
}),
|
|
75
|
-
execute: (args) => salary.list({ year: args.year, from: args.from, to: args.to, cycle: args.cycle, limit: args.limit }),
|
|
76
|
+
execute: (args) => salary.list({ year: args.year, from: args.from, to: args.to, cycle: args.cycle, employmentType: args.employmentType, limit: args.limit }),
|
|
76
77
|
});
|
|
77
78
|
action("salary.recordGet", {
|
|
78
79
|
description: "只读:单笔工资详情(全部收入项与扣款项)",
|
|
@@ -84,11 +85,12 @@ export function registerSalaryActions(api, salary) {
|
|
|
84
85
|
input: obj({
|
|
85
86
|
payDate: str("发薪日期 YYYY-MM-DD,必填;月结通常取当月 15 号"),
|
|
86
87
|
incomePeriod: str("工资所属期 YYYY-MM 或 YYYY-MM-DD;空串表示未归属;不传则月结取上月、日结取到账日"),
|
|
87
|
-
cycle: { type: "string", enum: ["monthly", "daily"], description: "
|
|
88
|
+
cycle: { type: "string", enum: ["monthly", "daily"], description: "结算方式:月结 monthly(默认)/ 日结 daily" },
|
|
89
|
+
employmentType: { type: "string", enum: EMPLOYMENT_VALUES, description: "用工类型:临时/兼职/外快/实习/试用/正式(temp/parttime/side/intern/probation/regular);可选,不传为未设置" },
|
|
88
90
|
...MONEY_SCHEMA,
|
|
89
91
|
note: str("备注,可选"),
|
|
90
92
|
}, ["payDate"]),
|
|
91
|
-
execute: (args) => salary.create({ payDate: args.payDate, incomePeriod: args.incomePeriod, cycle: args.cycle, note: args.note, ...amountsFrom(args) }),
|
|
93
|
+
execute: (args) => salary.create({ payDate: args.payDate, incomePeriod: args.incomePeriod, cycle: args.cycle, employmentType: args.employmentType, note: args.note, ...amountsFrom(args) }),
|
|
92
94
|
});
|
|
93
95
|
action("salary.recordUpdate", {
|
|
94
96
|
description: "修改一笔工资(会写库;只覆盖传入字段,金额改动后重算应发与实发)",
|
|
@@ -96,11 +98,12 @@ export function registerSalaryActions(api, salary) {
|
|
|
96
98
|
id: str("工资记录 id,必填"),
|
|
97
99
|
payDate: str("发薪日期 YYYY-MM-DD"),
|
|
98
100
|
incomePeriod: str("工资所属期 YYYY-MM 或 YYYY-MM-DD;空串清除,不传保留原值"),
|
|
99
|
-
cycle: { type: "string", enum: ["monthly", "daily"], description: "
|
|
101
|
+
cycle: { type: "string", enum: ["monthly", "daily"], description: "结算方式:月结 / 日结" },
|
|
102
|
+
employmentType: { type: "string", enum: EMPLOYMENT_VALUES, description: "用工类型:临时/兼职/外快/实习/试用/正式(temp/parttime/side/intern/probation/regular);传空串清除" },
|
|
100
103
|
...MONEY_SCHEMA,
|
|
101
104
|
note: str("备注"),
|
|
102
105
|
}, ["id"]),
|
|
103
|
-
execute: (args) => salary.update({ id: args.id, payDate: args.payDate, incomePeriod: args.incomePeriod, cycle: args.cycle, note: args.note, ...amountsFrom(args) }),
|
|
106
|
+
execute: (args) => salary.update({ id: args.id, payDate: args.payDate, incomePeriod: args.incomePeriod, cycle: args.cycle, employmentType: args.employmentType, note: args.note, ...amountsFrom(args) }),
|
|
104
107
|
});
|
|
105
108
|
action("salary.recordDelete", {
|
|
106
109
|
description: "软删除一笔工资(会写库;记录不再出现在列表与统计中)",
|
|
@@ -131,7 +134,7 @@ export function registerSalaryActions(api, salary) {
|
|
|
131
134
|
input: obj({}),
|
|
132
135
|
execute: () => ({
|
|
133
136
|
shellVersion: api.shellVersion || "",
|
|
134
|
-
domains: [{ id: "wb-addon-salary", version: (api.addon && api.addon.version) || "0.
|
|
137
|
+
domains: [{ id: "wb-addon-salary", version: (api.addon && api.addon.version) || "0.4.0" }],
|
|
135
138
|
actions: defs.filter((d) => d.name !== "salary.actionSchema").map((d) => ({ ...d, domain: "wb-addon-salary", examples: [] })),
|
|
136
139
|
}),
|
|
137
140
|
});
|
package/lib/domain/model.js
CHANGED
|
@@ -35,6 +35,31 @@ export const TAX_KEYS = ["incomeTax", "postTaxDeduction"];
|
|
|
35
35
|
export const CYCLE_VALUES = ["monthly", "daily"];
|
|
36
36
|
export const CYCLE_LABELS = { monthly: "月结", daily: "日结" };
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* 用工类型:与结算方式(月结/日结)相互独立。
|
|
40
|
+
* 只用于分类与统计切片,不参与金额推导;旧记录可为空(未设置)。
|
|
41
|
+
*/
|
|
42
|
+
export const EMPLOYMENT_TYPES = [
|
|
43
|
+
{ value: "temp", label: "临时" },
|
|
44
|
+
{ value: "parttime", label: "兼职" },
|
|
45
|
+
{ value: "side", label: "外快" },
|
|
46
|
+
{ value: "intern", label: "实习" },
|
|
47
|
+
{ value: "probation", label: "试用" },
|
|
48
|
+
{ value: "regular", label: "正式" },
|
|
49
|
+
];
|
|
50
|
+
export const EMPLOYMENT_VALUES = EMPLOYMENT_TYPES.map((t) => t.value);
|
|
51
|
+
export const EMPLOYMENT_LABELS = Object.fromEntries(EMPLOYMENT_TYPES.map((t) => [t.value, t.label]));
|
|
52
|
+
|
|
53
|
+
/** 空串/null 表示未设置;其它值必须在枚举内。 */
|
|
54
|
+
export function normalizeEmploymentType(value) {
|
|
55
|
+
if (value === undefined || value === null || value === "") return null;
|
|
56
|
+
const v = String(value).trim().toLowerCase();
|
|
57
|
+
if (!EMPLOYMENT_VALUES.includes(v)) {
|
|
58
|
+
throw new Error("用工类型只支持:" + EMPLOYMENT_TYPES.map((t) => t.label + "(" + t.value + ")").join("、"));
|
|
59
|
+
}
|
|
60
|
+
return v;
|
|
61
|
+
}
|
|
62
|
+
|
|
38
63
|
export function round2(value) {
|
|
39
64
|
const n = Number(value);
|
|
40
65
|
if (!Number.isFinite(n)) return 0;
|
package/lib/domain/salary.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
hasValue,
|
|
8
8
|
netFromGross,
|
|
9
9
|
normalizeCycle,
|
|
10
|
+
normalizeEmploymentType,
|
|
10
11
|
requireDate,
|
|
11
12
|
round2,
|
|
12
13
|
sumKeys,
|
|
@@ -64,7 +65,7 @@ export function createSalary({ db, host, log }) {
|
|
|
64
65
|
const latest = one("SELECT * FROM salary_record WHERE deleted_at IS NULL ORDER BY pay_date DESC, created_at DESC LIMIT 1");
|
|
65
66
|
const y = one("SELECT COUNT(*) n, COALESCE(SUM(net_pay),0) net FROM salary_record WHERE deleted_at IS NULL AND substr(pay_date,1,4)=?", String(year));
|
|
66
67
|
return {
|
|
67
|
-
version: "0.
|
|
68
|
+
version: "0.4.0",
|
|
68
69
|
records: total,
|
|
69
70
|
latestDate: latest ? latest.pay_date : "",
|
|
70
71
|
latestNetPay: latest ? round2(latest.net_pay) : 0,
|
|
@@ -93,6 +94,10 @@ export function createSalary({ db, host, log }) {
|
|
|
93
94
|
where.push("cycle=?");
|
|
94
95
|
params.push(normalizeCycle(input.cycle));
|
|
95
96
|
}
|
|
97
|
+
if (hasValue(input.employmentType)) {
|
|
98
|
+
where.push("employment_type=?");
|
|
99
|
+
params.push(normalizeEmploymentType(input.employmentType));
|
|
100
|
+
}
|
|
96
101
|
const clause = where.join(" AND ");
|
|
97
102
|
const limit = Math.min(Math.max(Number(input.limit) || 200, 1), 500);
|
|
98
103
|
const rows = all(`SELECT * FROM salary_record WHERE ${clause} ORDER BY pay_date DESC, created_at DESC LIMIT ?`, ...params, limit);
|
|
@@ -107,6 +112,7 @@ export function createSalary({ db, host, log }) {
|
|
|
107
112
|
function create(input = {}) {
|
|
108
113
|
const payDate = requireDate(input.payDate, "发薪日期");
|
|
109
114
|
const cycle = normalizeCycle(input.cycle);
|
|
115
|
+
const employmentType = normalizeEmploymentType(input.employmentType);
|
|
110
116
|
const period = incomePeriod(input.incomePeriod, payDate, cycle);
|
|
111
117
|
const money = moneyInput(input);
|
|
112
118
|
const gross = hasValue(input.grossPay) ? money.grossPay : derivedTotals(money).gross;
|
|
@@ -114,13 +120,14 @@ export function createSalary({ db, host, log }) {
|
|
|
114
120
|
const id = newId("sal");
|
|
115
121
|
const columns = MONEY_FIELDS.map((f) => f.column);
|
|
116
122
|
const values = MONEY_FIELDS.map((f) => (f.key === "grossPay" ? gross : f.key === "netPay" ? net : money[f.key]));
|
|
117
|
-
const placeholders = Array.from({ length: columns.length +
|
|
123
|
+
const placeholders = Array.from({ length: columns.length + 8 }, () => "?").join(", ");
|
|
118
124
|
run(
|
|
119
|
-
`INSERT INTO salary_record (id, pay_date, income_period, cycle, ${columns.join(", ")}, note, created_at, updated_at) VALUES (${placeholders})`,
|
|
125
|
+
`INSERT INTO salary_record (id, pay_date, income_period, cycle, employment_type, ${columns.join(", ")}, note, created_at, updated_at) VALUES (${placeholders})`,
|
|
120
126
|
id,
|
|
121
127
|
payDate,
|
|
122
128
|
period,
|
|
123
129
|
cycle,
|
|
130
|
+
employmentType,
|
|
124
131
|
...values,
|
|
125
132
|
String(input.note === undefined ? "" : input.note).trim(),
|
|
126
133
|
now(),
|
|
@@ -136,6 +143,7 @@ export function createSalary({ db, host, log }) {
|
|
|
136
143
|
if (input.payDate !== undefined) patch.payDate = requireDate(input.payDate, "发薪日期");
|
|
137
144
|
if (input.incomePeriod !== undefined) patch.incomePeriod = incomePeriod(input.incomePeriod);
|
|
138
145
|
if (input.cycle !== undefined) patch.cycle = normalizeCycle(input.cycle);
|
|
146
|
+
if (input.employmentType !== undefined) patch.employmentType = normalizeEmploymentType(input.employmentType);
|
|
139
147
|
if (input.note !== undefined) patch.note = String(input.note || "").trim();
|
|
140
148
|
let moneyChanged = false;
|
|
141
149
|
for (const field of MONEY_FIELDS) {
|
|
@@ -149,10 +157,11 @@ export function createSalary({ db, host, log }) {
|
|
|
149
157
|
if (!hasValue(input.netPay) && (moneyChanged || hasValue(input.grossPay))) merged.netPay = netFromGross(merged);
|
|
150
158
|
const assignments = MONEY_FIELDS.map((f) => f.column + "=?");
|
|
151
159
|
run(
|
|
152
|
-
`UPDATE salary_record SET pay_date=?, income_period=?, cycle=?, ${assignments.join(", ")}, note=?, updated_at=?, rev=rev+1 WHERE id=? AND deleted_at IS NULL`,
|
|
160
|
+
`UPDATE salary_record SET pay_date=?, income_period=?, cycle=?, employment_type=?, ${assignments.join(", ")}, note=?, updated_at=?, rev=rev+1 WHERE id=? AND deleted_at IS NULL`,
|
|
153
161
|
merged.payDate,
|
|
154
162
|
merged.incomePeriod,
|
|
155
163
|
merged.cycle,
|
|
164
|
+
merged.employmentType ?? null,
|
|
156
165
|
...MONEY_FIELDS.map((f) => merged[f.key]),
|
|
157
166
|
merged.note,
|
|
158
167
|
now(),
|
|
@@ -233,6 +242,66 @@ export function createSalary({ db, host, log }) {
|
|
|
233
242
|
? { amount: diff, percent: previousMonth.netPay ? round2((diff / previousMonth.netPay) * 100) : null }
|
|
234
243
|
: null;
|
|
235
244
|
const latestRows = latestMonth ? rows.filter((r) => MONTH_OF(groupDate(r)) === latestMonth.month) : [];
|
|
245
|
+
// 年度/季度跨期聚合:口径与 monthly 完全一致(arrival 用 pay_date、income 用 income_period),
|
|
246
|
+
// 只对真实存在的年份/季度出点,空年空季不补 0,避免把「还没到的季度」画成 0。
|
|
247
|
+
const datedRows = all(
|
|
248
|
+
`SELECT * FROM salary_record WHERE deleted_at IS NULL AND ${dateColumn} IS NOT NULL ORDER BY ${dateColumn}, id`,
|
|
249
|
+
).map(salaryRow);
|
|
250
|
+
const quarterOf = (date) => `${String(date).slice(0, 4)}-Q${Math.floor((Number(String(date).slice(5, 7)) - 1) / 3) + 1}`;
|
|
251
|
+
const aggregate = (bucketOf) => {
|
|
252
|
+
const map = new Map();
|
|
253
|
+
for (const row of datedRows) {
|
|
254
|
+
const bucket = bucketOf(basis === "income" ? row.incomePeriod : row.payDate);
|
|
255
|
+
if (!bucket) continue;
|
|
256
|
+
const acc = map.get(bucket) || { bucket, count: 0, netTotal: 0, grossTotal: 0, netMax: 0, grossMax: 0 };
|
|
257
|
+
acc.count += 1;
|
|
258
|
+
acc.netTotal = round2(acc.netTotal + row.netPay);
|
|
259
|
+
acc.grossTotal = round2(acc.grossTotal + row.grossPay);
|
|
260
|
+
acc.netMax = round2(Math.max(acc.netMax, row.netPay));
|
|
261
|
+
acc.grossMax = round2(Math.max(acc.grossMax, row.grossPay));
|
|
262
|
+
map.set(bucket, acc);
|
|
263
|
+
}
|
|
264
|
+
return [...map.values()]
|
|
265
|
+
.sort((a, b) => (a.bucket < b.bucket ? -1 : a.bucket > b.bucket ? 1 : 0))
|
|
266
|
+
.map((item) => ({ ...item, netAvg: round2(item.netTotal / item.count), grossAvg: round2(item.grossTotal / item.count) }));
|
|
267
|
+
};
|
|
268
|
+
const yearly = aggregate((date) => String(date).slice(0, 4));
|
|
269
|
+
// 季度折线默认展示最近 8 个有记录的季度,数据不足时就是实际有几个画几个。
|
|
270
|
+
const quarterly = aggregate(quarterOf).slice(-8);
|
|
271
|
+
// 同比:上一年同期 12 个月的实发/应发,用于「今年 vs 去年」对照线。
|
|
272
|
+
const priorYear = year - 1;
|
|
273
|
+
const priorRows = all(
|
|
274
|
+
`SELECT * FROM salary_record WHERE deleted_at IS NULL AND ${dateColumn}>=? AND ${dateColumn}<? ORDER BY ${dateColumn}, id`,
|
|
275
|
+
`${priorYear}-01`,
|
|
276
|
+
`${priorYear + 1}-01`,
|
|
277
|
+
).map(salaryRow);
|
|
278
|
+
const priorMonthly = Array.from({ length: 12 }, (_, i) => ({ month: i + 1, records: 0, netPay: 0, grossPay: 0 }));
|
|
279
|
+
for (const row of priorRows) {
|
|
280
|
+
const bucket = priorMonthly[MONTH_OF(groupDate(row)) - 1];
|
|
281
|
+
bucket.records += 1;
|
|
282
|
+
bucket.netPay = round2(bucket.netPay + row.netPay);
|
|
283
|
+
bucket.grossPay = round2(bucket.grossPay + row.grossPay);
|
|
284
|
+
}
|
|
285
|
+
// 单笔实发分布:按当前年份、当前口径的记录分档,档位边界写死便于核对。
|
|
286
|
+
const DIST_BUCKETS = [
|
|
287
|
+
{ key: "lt5k", label: "5k 以下", upper: 5000 },
|
|
288
|
+
{ key: "5to8k", label: "5k–8k", upper: 8000 },
|
|
289
|
+
{ key: "8to12k", label: "8k–12k", upper: 12000 },
|
|
290
|
+
{ key: "12to20k", label: "12k–20k", upper: 20000 },
|
|
291
|
+
{ key: "gte20k", label: "20k 以上", upper: null },
|
|
292
|
+
];
|
|
293
|
+
const distribution = DIST_BUCKETS.map((b, i) => ({ key: b.key, label: b.label, lower: i === 0 ? 0 : DIST_BUCKETS[i - 1].upper, upper: b.upper, count: 0 }));
|
|
294
|
+
for (const row of rows) {
|
|
295
|
+
const value = Math.max(0, row.netPay);
|
|
296
|
+
const hit = distribution.find((d) => d.upper === null || value < d.upper);
|
|
297
|
+
if (hit) hit.count += 1;
|
|
298
|
+
}
|
|
299
|
+
const peakMonth = monthsWithData.length
|
|
300
|
+
? monthsWithData.reduce((best, b) => (b.netPay > best.netPay ? b : best), monthsWithData[0])
|
|
301
|
+
: null;
|
|
302
|
+
const lowestMonth = monthsWithData.length
|
|
303
|
+
? monthsWithData.reduce((worst, b) => (b.netPay < worst.netPay ? b : worst), monthsWithData[0])
|
|
304
|
+
: null;
|
|
236
305
|
return {
|
|
237
306
|
year,
|
|
238
307
|
basis,
|
|
@@ -251,6 +320,13 @@ export function createSalary({ db, host, log }) {
|
|
|
251
320
|
latestMonth: latestMonth ? { ...latestMonth, breakdown: breakdown(latestRows) } : null,
|
|
252
321
|
previousMonth,
|
|
253
322
|
mom,
|
|
323
|
+
yearly,
|
|
324
|
+
quarterly,
|
|
325
|
+
priorYear,
|
|
326
|
+
priorMonthly,
|
|
327
|
+
distribution,
|
|
328
|
+
peakMonth: peakMonth ? { month: peakMonth.month, period: peakMonth.period, netPay: peakMonth.netPay } : null,
|
|
329
|
+
lowestMonth: lowestMonth ? { month: lowestMonth.month, period: lowestMonth.period, netPay: lowestMonth.netPay } : null,
|
|
254
330
|
};
|
|
255
331
|
}
|
|
256
332
|
|
package/lib/index.js
CHANGED
|
@@ -27,13 +27,13 @@ export function apply(ctx) {
|
|
|
27
27
|
ctx.effect(() => host.registerDomain({
|
|
28
28
|
id: "wb-addon-salary",
|
|
29
29
|
title: "工资",
|
|
30
|
-
description: "
|
|
31
|
-
version: "0.
|
|
30
|
+
description: "按日期记录日结/月结工资:用工类型、收入项、税前扣款、社保公积金、个税与实发",
|
|
31
|
+
version: "0.4.0",
|
|
32
32
|
tables: ["salary_record"],
|
|
33
33
|
sync: { tables: [] },
|
|
34
34
|
views: VIEWS,
|
|
35
35
|
capability: {
|
|
36
|
-
summary: "
|
|
36
|
+
summary: "记录每一笔工资的日期、用工类型(实习/试用/正式等)、结算方式与全部金额明细,按年/按月统计实发、应发、个税与社保;不做报销与支出流水。",
|
|
37
37
|
records: [{
|
|
38
38
|
kind: "record",
|
|
39
39
|
title: "工资记录",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-salary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "个人工作台工资插件:按发薪日期记录工资构成、扣款与实发",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"addon": {
|
|
17
17
|
"id": "wb-addon-salary",
|
|
18
18
|
"title": "工资",
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.4.0",
|
|
20
20
|
"minShell": "0.8.0",
|
|
21
21
|
"tables": [
|
|
22
22
|
"salary_record"
|