huminmin
2026-04-30 b4fb6d19e33450b40da8d8b75a720bab8434af02
src/views/procurementManagement/procurementLedger/index.vue
@@ -177,7 +177,7 @@
                       :disabled="scope.row.approvalStatus !== 1 && scope.row.approvalStatus !== 4">编辑</el-button>
            <el-button link
                       type="primary"
                       @click="downLoadFile(scope.row)">附件</el-button>
                       @click="openFileDialog(scope.row)">附件</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -640,11 +640,7 @@
        </el-row>
      </el-form>
    </FormDialog>
    <FileListDialog
      ref="fileListRef"
      v-model="fileListDialogVisible"
      title="附件列表"
    />
    <FileList v-if="fileDialogVisible"  v-model:visible="fileDialogVisible" record-type="purchase_ledger" :record-id="recordId"  />
  </div>
</template>
@@ -661,8 +657,6 @@
  } from "vue";
  import { Search, Delete } from "@element-plus/icons-vue";
  import { ElMessageBox, ElMessage } from "element-plus";
  import FormDialog from '@/components/Dialog/FormDialog.vue';
  import FileListDialog from '@/components/Dialog/FileListDialog.vue';
  import {
    getSalesLedgerWithProducts,
    addOrUpdateSalesLedgerProduct,
@@ -685,6 +679,7 @@
    delPurchaseTemplate,
  } from "@/api/procurementManagement/procurementLedger.js";
  import useFormData from "@/hooks/useFormData.js";
  const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue"));
  const { proxy } = getCurrentInstance();
  const tableData = ref([]);
@@ -1753,13 +1748,15 @@
    }
  };
  const fileListRef = ref(null);
  const fileListDialogVisible = ref(false);
  const downLoadFile = row => {
    if (fileListRef.value) {
      fileListRef.value.open(row.salesLedgerFiles);
  // 打开附件弹窗
  const recordId =ref(0)
  const fileDialogVisible = ref(false)
  // 打开附件弹框
  const openFileDialog = async (row) => {
    recordId.value = row.id
    fileDialogVisible.value = true
    }
  };
  // 获取模板信息
  const getTemplateList = async () => {