# Project Detail Pull Bank Info Frontend Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Build the “拉取本行信息” modal on the project detail upload page, including ID-card Excel auto-parse and backfill, date-range submission, and reuse of the existing upload-record polling refresh flow.
**Architecture:** Keep the implementation inside the existing `UploadData.vue` page and `ccdiProjectUpload.js` API module instead of introducing a new page or a new API file. Replace the current confirm-only placeholder with a real dialog, call a dedicated parse endpoint as soon as the user chooses an Excel file, merge the returned身份证集合 back into the textarea, then submit the final list and reuse the existing statistics, record list, and polling behavior.
**Tech Stack:** Vue 2.6, Element UI 2.15, Axios request wrapper, existing polling/list refresh logic, `npm run build:prod`
---
### Task 1: Add API contracts and make the build fail first
**Files:**
- Modify: `ruoyi-ui/src/api/ccdiProjectUpload.js`
- Modify: `ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue`
**Step 1: Write the failing verification**
先在 `UploadData.vue` 中把原来的简单确认流程替换成新的 API 引用,但暂时不创建 API 方法:
```javascript
import {
getImportStatus,
getNameListOptions,
getUploadStatus,
pullBankInfo,
parseIdCardFile,
updateNameListSelection,
uploadFile,
batchUploadFiles,
getFileUploadList,
getFileUploadStatistics,
} from "@/api/ccdiProjectUpload";
```
并把 `handleFetchBankInfo` 改成只打开弹窗:
```javascript
handleFetchBankInfo() {
this.pullBankInfoDialogVisible = true;
}
```
**Step 2: Run build to verify it fails**
Run: `cd ruoyi-ui; npm run build:prod`
Expected: FAIL because `parseIdCardFile` does not exist in `ccdiProjectUpload.js`, and the new dialog state has not been defined.
**Step 3: Write minimal implementation**
在 `ccdiProjectUpload.js` 中补两个接口:
```javascript
export function parseIdCardFile(file) {
const formData = new FormData();
formData.append("file", file);
return request({
url: "/ccdi/file-upload/parse-id-card-file",
method: "post",
data: formData,
headers: {
"Content-Type": "multipart/form-data"
}
});
}
```
```javascript
export function pullBankInfo(data) {
return request({
url: "/ccdi/file-upload/pull-bank-info",
method: "post",
data
});
}
```
注意:把原来 `pullBankInfo(projectId)` 的签名改成 JSON 提交,不再走 `/ccdi/project/{projectId}/pull-bank-info` 占位接口。
**Step 4: Run build to verify it still only fails on missing dialog state**
Run: `cd ruoyi-ui; npm run build:prod`
Expected: FAIL only because `UploadData.vue` 还没有新增弹窗数据和模板绑定。
**Step 5: Commit**
```bash
git add ruoyi-ui/src/api/ccdiProjectUpload.js ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue
git commit -m "补充拉取本行信息前端接口契约"
```
### Task 2: Build the modal shell and page state
**Files:**
- Modify: `ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue`
**Step 1: Write the failing verification**
在模板里新增弹窗骨架,但先不实现方法:
- `el-dialog` 标题:`拉取本行信息`
- `el-input type="textarea"` 用于证件号码输入
- `el-upload` 用于身份证文件上传
- `el-date-picker type="daterange"` 用于时间跨度
- 底部按钮:`取消`、`确认拉取`
使用以下数据字段:
```javascript
pullBankInfoDialogVisible: false,
pullBankInfoLoading: false,
parsingIdCardFile: false,
idCardFileList: [],
pullBankInfoForm: {
idCardText: "",
dateRange: []
}
```
**Step 2: Run build to verify it fails**
Run: `cd ruoyi-ui; npm run build:prod`
Expected: FAIL because the template references `pullBankInfoDialogVisible`, `pullBankInfoForm`, and upload handlers that are not implemented yet.
**Step 3: Write minimal implementation**
在 `data()` 中补齐新状态,并实现基础弹窗方法:
```javascript
openPullBankInfoDialog() {
this.pullBankInfoDialogVisible = true;
}
```
```javascript
resetPullBankInfoForm() {
this.pullBankInfoForm = {
idCardText: "",
dateRange: []
};
this.idCardFileList = [];
this.parsingIdCardFile = false;
this.pullBankInfoLoading = false;
}
```
同时调整 `handleFetchBankInfo()` 改为:
```javascript
handleFetchBankInfo() {
this.resetPullBankInfoForm();
this.openPullBankInfoDialog();
}
```
**Step 4: Run build to verify it passes**
Run: `cd ruoyi-ui; npm run build:prod`
Expected: PASS
**Step 5: Commit**
```bash
git add ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue
git commit -m "搭建拉取本行信息弹窗骨架"
```
### Task 3: Implement instant Excel parsing and textarea backfill
**Files:**
- Modify: `ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue`
**Step 1: Write the failing verification**
把文件上传控件接到实际事件,但先不写实现:
```html