#
Junjie
2024-08-01 587a747a56f076457f6d9839cbe874b60f6f696c
zy-asrs-admin/src/components/order/index.vue
@@ -28,6 +28,7 @@
const {
  getColumnSearchProps,
  handleResizeColumn,
} = useTableSearch();
const columns = [
@@ -130,7 +131,14 @@
};
function getPage() {
  post(props.ioModel == 'in' ? '/api/order/in/page' : '/api/order/out/page', {
  let apiUrl = '/api/order/page';
  if (props.ioModel == 'in') {
    apiUrl = '/api/order/in/page';
  } else if (props.ioModel == 'out') {
    apiUrl = '/api/order/out/page';
  }
  post(apiUrl, {
    current: currentPage,
    pageSize: pageSize,
    condition: searchInput.value,
@@ -185,7 +193,9 @@
}
const handleExport = async (intl) => {
  postBlob('/api/order/export', {}).then(result => {
  postBlob('/api/order/export', {
    ioModel: props.ioModel
  }).then(result => {
    const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
    window.location.href = window.URL.createObjectURL(blob);
    return true;
@@ -217,7 +227,7 @@
<template>
  <div>
    <EditView ref="editChild" @tableReload="handleTableReload" :ioModel="ioModel == 'in' ? 1 : 2" />
    <EditView ref="editChild" @tableReload="handleTableReload" :ioModel="ioModel == 'in' ? 1 : ioModel == 'out' ? 2 : null" />
    <div class="table-header">
      <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
        style="width: 200px;" @search="onSearch" />
@@ -229,7 +239,7 @@
    <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
      :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
      :pagination="{ total: tableData.total, onChange: onPageChange }"
      :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns">
      :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn">
      <template #bodyCell="{ column, text, record }">
        <template v-if="column.dataIndex === 'oper'">
          <div style="display: flex;justify-content: space-evenly;">