#
Junjie
2024-09-10 a54f85deb9d8c8778ec77ae115b8db4cabc934be
zy-asrs-admin/src/views/strategy/waitPakinRule/index.vue
@@ -17,6 +17,11 @@
const searchInput = ref("")
const editChild = ref(null)
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
let tableData = ref([]);
getPage();
@@ -26,62 +31,62 @@
} = useTableSearch();
const columns = [
        {
            title: formatMessage('db.strategy_wait_pakin_rule.pallet_order', '托盘订单'),
            dataIndex: 'palletOrder$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('palletOrder$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.pallet_mixed', '是否混载'),
            dataIndex: 'palletMixed$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('palletMixed$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.status', '状态'),
            dataIndex: 'status$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('status$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.create_time', '添加时间'),
            dataIndex: 'createTime$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('createTime$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.create_by', '添加人员'),
            dataIndex: 'createBy$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('createBy$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.update_time', '修改时间'),
            dataIndex: 'updateTime$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('updateTime$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.update_by', '修改人员'),
            dataIndex: 'updateBy$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('updateBy$'),
        },
        {
            title: formatMessage('db.strategy_wait_pakin_rule.memo', '备注'),
            dataIndex: 'memo',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('memo'),
        },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.pallet_order', '托盘订单'),
    dataIndex: 'palletOrder$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('palletOrder$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.pallet_mixed', '是否混载'),
    dataIndex: 'palletMixed$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('palletMixed$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.status', '状态'),
    dataIndex: 'status$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('status$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.create_time', '添加时间'),
    dataIndex: 'createTime$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('createTime$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.create_by', '添加人员'),
    dataIndex: 'createBy$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('createBy$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.update_time', '修改时间'),
    dataIndex: 'updateTime$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('updateTime$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.update_by', '修改人员'),
    dataIndex: 'updateBy$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('updateBy$'),
  },
  {
    title: formatMessage('db.strategy_wait_pakin_rule.memo', '备注'),
    dataIndex: 'memo',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('memo'),
  },
  {
    title: formatMessage('common.operation', '操作'),
@@ -93,10 +98,7 @@
  },
];
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
  state.loading = true;
@@ -112,6 +114,7 @@
};
function getPage() {
  state.loading = true;
  post('/api/waitPakinRule/page', {
    current: currentPage,
    pageSize: pageSize,
@@ -121,6 +124,8 @@
    if (result.code == 200) {
      let data = result.data;
      tableData.value = data;
      state.loading = false;
    } else if (result.code === 401) {
      message.error(result.msg);
      logout()
@@ -206,7 +211,8 @@
    <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" @resizeColumn="handleResizeColumn">
      :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"
      :loading="state.loading">
      <template #bodyCell="{ column, text, record }">
        <template v-if="column.dataIndex === 'oper'">
          <div style="display: flex;justify-content: space-evenly;">