gaoluyang
5 天以前 2e2cfb656b594834e9101bfd1365c201cd9355bc
feat(input-invoice): 进项发票增加附件查看/上传入口

操作列新增「附件」按钮,复用 FileList 组件,recordType 为
account_purchase_invoice;列宽 200→240。

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改1个文件
22 ■■■■■ 文件已修改
src/views/financialManagement/payable/input-invoice.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/financialManagement/payable/input-invoice.vue
@@ -76,6 +76,7 @@
        </template>
        <template #operation="{ row }">
          <el-button type="primary" link @click="view(row)">查看</el-button>
          <el-button type="primary" link @click="openFileDialog(row)">附件</el-button>
          <el-button type="warning" link @click="handleCancel(row)" v-if="isNormalStatus(row.status)">作废</el-button>
          <el-button type="danger" link @click="handleDelete(row)">删除</el-button>
        </template>
@@ -283,11 +284,18 @@
        <el-button @click="inboundSelectVisible = false">取消</el-button>
      </template>
    </el-dialog>
    <FileList
      v-if="fileDialogVisible"
      v-model:visible="fileDialogVisible"
      record-type="account_purchase_invoice"
      :record-id="currentRecordId"
    />
  </div>
</template>
<script setup>
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance } from "vue";
import { ref, reactive, computed, onMounted, nextTick, getCurrentInstance, defineAsyncComponent } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import FormDialog from "@/components/Dialog/FormDialog.vue";
import { getOptions } from "@/api/procurementManagement/procurementLedger.js";
@@ -298,6 +306,8 @@
  cancelAccountPurchaseInvoice,
  deleteAccountPurchaseInvoice,
} from "@/api/financialManagement/accountPurchaseInvoice.js";
const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue"));
defineOptions({
  name: "进项发票",
@@ -328,7 +338,7 @@
  { label: "价税合计", prop: "totalAmount", dataType: "slot", slot: "totalAmount" },
  { label: "发票类型", prop: "invoiceType", width: "130" },
  { label: "状态", prop: "status", dataType: "slot", slot: "status", width: "90", align: "center" },
  { label: "操作", prop: "operation", dataType: "slot", slot: "operation", width: "200", fixed: "right" },
  { label: "操作", prop: "operation", dataType: "slot", slot: "operation", width: "240", fixed: "right" },
];
const dataList = ref([]);
@@ -729,6 +739,14 @@
  dialogVisible.value = true;
};
const fileDialogVisible = ref(false);
const currentRecordId = ref(0);
const openFileDialog = (row) => {
  currentRecordId.value = row.id;
  fileDialogVisible.value = true;
};
const view = (row) => {
  isView.value = true;
  dialogTitle.value = "查看发票";