实现员工资产维护前端功能

This commit is contained in:
wkc
2026-03-12 18:42:41 +08:00
parent 3481c37d55
commit 58e022fe64
7 changed files with 1256 additions and 156 deletions

View File

@@ -0,0 +1,29 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const componentPath = path.resolve(
__dirname,
"../../src/views/ccdiBaseStaff/index.vue"
);
const source = fs.readFileSync(componentPath, "utf8");
[
"assetInfoList: []",
"normalizeAssetInfoList()",
"this.form.assetInfoList = [];",
"response.data.assetInfoList || []",
"this.form.assetInfoList = this.normalizeAssetInfoList();",
"'form.idCard'(newIdCard, oldIdCard)",
"syncAssetPersonIds(newIdCard, oldIdCard)",
"this.form.assetInfoList.push(this.createEmptyAssetRow(this.form.idCard));",
"personId: defaultPersonId || \"\"",
"assetStatusOptions.some(option => option.value === asset.assetStatus)",
].forEach((token) => {
assert(
source.includes(token),
`员工资产提交流程缺少关键处理: ${token}`
);
});
console.log("employee-asset-submit-flow test passed");