#
Junjie
2025-02-14 ac4341ea6b66ae02427d39d35f41d42d78b2eb2e
zy-asrs-admin/src/views/strategy/suggestLocRule/index.vue
@@ -17,6 +17,11 @@
const searchInput = ref("")
const editChild = ref(null)
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
let tableData = ref([]);
getPage();
@@ -27,8 +32,15 @@
const columns = [
  {
    title: formatMessage('db.strategy_suggest_loc_rule.locType$', '库位类型'),
    dataIndex: 'locType$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('locType$'),
  },
  {
    title: formatMessage('db.strategy_suggest_loc_rule.mat_id', '商品'),
    dataIndex: ['mat$','matnr'],
    dataIndex: ['mat$', 'matnr'],
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('matId$'),
@@ -135,10 +147,7 @@
  },
];
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
  state.loading = true;
@@ -154,6 +163,7 @@
};
function getPage() {
  state.loading = true;
  post('/api/suggestLocRule/page', {
    current: currentPage,
    pageSize: pageSize,
@@ -163,6 +173,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()
@@ -248,7 +260,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;">