#
Junjie
2024-09-10 a54f85deb9d8c8778ec77ae115b8db4cabc934be
zy-asrs-admin/src/views/order/orderDetlLog/index.vue
@@ -17,6 +17,11 @@
const searchInput = ref("")
const editChild = ref(null)
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
let tableData = ref([]);
getPage();
@@ -26,97 +31,97 @@
} = useTableSearch();
const columns = [
        {
            title: formatMessage('db.man_order_detl_log.order_id', '订单ID'),
            dataIndex: 'orderId$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('orderId$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.order_no', '订单编号'),
            dataIndex: 'orderNo',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('orderNo'),
        },
        {
            title: formatMessage('db.man_order_detl_log.anfme', '数量'),
            dataIndex: 'anfme',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('anfme'),
        },
        {
            title: formatMessage('db.man_order_detl_log.qty', '已完成数量'),
            dataIndex: 'qty',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('qty'),
        },
        {
            title: formatMessage('db.man_order_detl_log.work_qty', '作业中数量'),
            dataIndex: 'workQty',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('workQty'),
        },
        {
            title: formatMessage('db.man_order_detl_log.mat_id', '物料'),
            dataIndex: 'matId$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('matId$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.batch', '批号'),
            dataIndex: 'batch',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('batch'),
        },
        {
            title: formatMessage('db.man_order_detl_log.status', '状态'),
            dataIndex: 'status$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('status$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.create_time', '添加时间'),
            dataIndex: 'createTime$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('createTime$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.create_by', '添加人员'),
            dataIndex: 'createBy$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('createBy$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.update_time', '修改时间'),
            dataIndex: 'updateTime$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('updateTime$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.update_by', '修改人员'),
            dataIndex: 'updateBy$',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('updateBy$'),
        },
        {
            title: formatMessage('db.man_order_detl_log.memo', '备注'),
            dataIndex: 'memo',
            width: 140,
            ellipsis: true,
            ...getColumnSearchProps('memo'),
        },
  {
    title: formatMessage('db.man_order_detl_log.order_id', '订单ID'),
    dataIndex: 'orderId$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('orderId$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.order_no', '订单编号'),
    dataIndex: 'orderNo',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('orderNo'),
  },
  {
    title: formatMessage('db.man_order_detl_log.anfme', '数量'),
    dataIndex: 'anfme',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('anfme'),
  },
  {
    title: formatMessage('db.man_order_detl_log.qty', '已完成数量'),
    dataIndex: 'qty',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('qty'),
  },
  {
    title: formatMessage('db.man_order_detl_log.work_qty', '作业中数量'),
    dataIndex: 'workQty',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('workQty'),
  },
  {
    title: formatMessage('db.man_order_detl_log.mat_id', '物料'),
    dataIndex: 'matId$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('matId$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.batch', '批号'),
    dataIndex: 'batch',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('batch'),
  },
  {
    title: formatMessage('db.man_order_detl_log.status', '状态'),
    dataIndex: 'status$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('status$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.create_time', '添加时间'),
    dataIndex: 'createTime$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('createTime$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.create_by', '添加人员'),
    dataIndex: 'createBy$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('createBy$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.update_time', '修改时间'),
    dataIndex: 'updateTime$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('updateTime$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.update_by', '修改人员'),
    dataIndex: 'updateBy$',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('updateBy$'),
  },
  {
    title: formatMessage('db.man_order_detl_log.memo', '备注'),
    dataIndex: 'memo',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('memo'),
  },
  {
    title: formatMessage('common.operation', '操作'),
@@ -127,10 +132,6 @@
  },
];
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
  state.loading = true;
@@ -146,6 +147,8 @@
};
function getPage() {
  state.loading = true;
  post('/api/orderDetlLog/page', {
    current: currentPage,
    pageSize: pageSize,
@@ -155,6 +158,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()
@@ -240,7 +245,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" @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;">