chenhj
2026-04-30 8e4c8d6ed7088e0f9e396f324796929cc79778ca
src/views/procurementManagement/procurementLedger/index.vue
@@ -53,8 +53,7 @@
    <div class="table_list">
      <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
        <el-button type="primary"
                   @click="openForm('add')">新增台账
        </el-button>
                   @click="openForm('add')">新增台账</el-button>
        <el-button type="primary" plain @click="handleImport">导入</el-button>
        <el-button @click="handleOut">导出</el-button>
        <el-button type="danger"
@@ -181,8 +180,7 @@
            </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>
@@ -632,15 +630,14 @@
        </el-row>
      </el-form>
    </FormDialog>
    <FileListDialog
        ref="fileListRef"
        v-model="fileListDialogVisible"
        title="附件列表"
    />
    <FileList v-if="fileListDialogVisible"  v-model:visible="fileListDialogVisible" record-type="purchase_ledger" :record-id="recordId"  />
  </div>
</template>
<script setup>
import {Search, Delete} from "@element-plus/icons-vue";
import FormDialog from '@/components/Dialog/FormDialog.vue';
import FileListDialog from '@/components/Dialog/FileListDialog.vue';
import {getToken} from "@/utils/auth";
import pagination from "@/components/PIMTable/Pagination.vue";
import {
@@ -653,10 +650,7 @@
} 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,
  delProduct,
  delLedgerFile,
@@ -677,6 +671,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([]);
@@ -1760,6 +1755,12 @@
  }
};
// 打开附件弹框
const openFileDialog = async (row) => {
  recordId.value = row.id
  fileListDialogVisible.value = true
}
// 删除模板
const handleDeleteTemplate = async (item) => {
  if (!item.id) {