fix: 修复匹配详情提示及公积金可选路径问题

修复匹配详情中“用户自填未经核验”等来源说明,清理未参与项的橙色注意提示,修正贷款统计口径文案;补充公积金完整可选路径提取逻辑,确保明确无额外时长要求的公积金分支可正确识别并通过。
This commit is contained in:
hujun
2026-10-19 16:11:59 +08:00
parent c95482a0f3
commit e5406c23a6
75 changed files with 31813 additions and 107 deletions
+22
View File
@@ -0,0 +1,22 @@
const fs=require('node:fs'),vm=require('node:vm'),assert=require('node:assert/strict');
const ts=require('D:/Develop/HBuilderX/plugins/uniapp-uts-v1/node_modules/@dcloudio/uni-uts-v1/lib/typescript/lib/typescript.js');
class Json {constructor(values={}){Object.assign(this,values)} getString(k){return this[k]??null} getNumber(k){return this[k]??null} getBoolean(k){return this[k]??null} getJSON(k){return this[k]??null} getArray(k){return this[k]??null}}
let sent, reply;
function load(file){const out={};const source=fs.readFileSync(__dirname+'/../'+file,'utf8');vm.runInNewContext(ts.transpileModule(source,{compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2020}}).outputText,{exports:out,UTSJSONObject:Json,require:p=>{
if(p.endsWith('api.uts'))return {getSession:()=>({token:'synthetic'}),requestJson:async(path,method,body)=>{sent=body;return reply ?? new Json({assessmentId:'1',revisionId:'2',submissionStatus:'accepted'})}};
if(p.endsWith('/assessment.uts'))return {assessmentApiPayload:p=>p,draftText:(p,k)=>typeof p[k]==='string'?p[k]:''};
if(p.endsWith('assessment-flow.uts'))return {assessmentRequestKey:()=> 'synthetic-key'};
if(p.endsWith('cities.uts'))return load('services/cities.uts');
if(p.endsWith('contribution.uts'))return {contributionLabel:v=>v};
return {};
}});return out;}
(async()=>{const service=load('packages/finance/services/records.uts');let checks=0;
for(const [city,provinceCode,cityCode]of[['广东省','440000',null],['北京市','110000',null],['台湾省','710000',null],['深圳市',undefined,'440300'],['南京市',undefined,null],['旧手填地区',undefined,null]]){
await service.createAssessment(new Json({type:'personal',city,documents:[],authorizations:[]}));
assert.equal(sent.form.city,city);assert.equal(sent.form.cityCode,cityCode);assert.equal(sent.form.provinceCode,provinceCode);checks+=3;
}
for(const [city,provinceCode,label]of[['广东省','440000','所在省份'],['深圳市',undefined,'城市']]){
reply=new Json({assessmentId:'1',revisionId:'2',revisionNo:1,type:'personal',status:'succeeded',form:new Json({city,provinceCode})});
const detail=await service.fetchAssessmentDetail('1','2');assert.equal(detail.fields[2].label,label);assert.equal(detail.fields[2].value,city);checks+=2;
}
console.log(`PASS: ${checks} region submit/detail checks`);})().catch(e=>{console.error(e);process.exitCode=1});