Ben Lin
2024-06-03 8f5009a3d57821c2c97690b8419e428967b5e981
src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue
@@ -15,7 +15,7 @@
          @click="handleSelectItem"
          preIcon="search|svg"
        />
        <ItemModal @register="registerItemAdd" @success="handleItemSuccess" />
        <NormalModal @register="registerItemAdd" @success="handleItemSuccess" />
      </template>
      <template #action="{ record }">
        <TableAction
@@ -66,18 +66,19 @@
  </div>
</template>
<script lang="ts" setup>
  import { reactive, unref, h } from 'vue';
  import { reactive, unref, h, onMounted } from 'vue';
  import { BasicTable, useTable, TableAction } from '/@/components/Table';
  import WoDrawer from './WoDrawer.vue';
  import WoModal from './WoModal.vue';
  import ItemModal from '/@/views/components/ItemModal.vue';
  import NormalModal from '/@/views/components/NormalModal.vue';
  import { useDrawer } from '/@/components/Drawer';
  import { columns, searchFormSchema } from './biz_mes_wo.data';
  import { DeleteMesWo, getWoListByPage } from '/@/api/tigerapi/mes/wo';
  import { DeleteMesWo } from '/@/api/tigerapi/mes/wo';
  import { Loading } from '/@/components/Loading';
  import { useMessage } from '/@/hooks/web/useMessage';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { useModal } from '/@/components/Modal';
  import { getListByPage } from '/@/api/tigerapi/system';
  const { t } = useI18n();
  const { createMessage } = useMessage();
@@ -91,7 +92,7 @@
  const [registerItemAdd, { openModal: openItemModal }] = useModal();
  const [registerTable, { getForm, reload }] = useTable({
    title: '工单信息',
    api: getWoListByPage,
    api: getListByPage,
    columns,
    formConfig: {
      labelWidth: 120,
@@ -110,6 +111,8 @@
    bordered: true,
    showIndexColumn: false,
  });
  onMounted(() => {});
  //新增
  function addWo() {
@@ -167,8 +170,35 @@
  //点击打开物料列表框
  function handleSelectItem() {
    openItemModal(true, {
      data: 'content',
      info: 'Info',
      title: '物料列表',
      schemas: [
        {
          field: 'ITEM_CODE',
          component: 'Input',
          label: '物料编码',
          colProps: {
            span: 12,
          },
        },
      ],
      ItemColumns: [
        {
          title: t('物料编码'),
          dataIndex: 'ITEM_CODE',
          resizable: true,
          sorter: true,
          width: 200,
        },
        {
          title: t('物料名称'),
          dataIndex: 'ITEM_NAME',
          resizable: true,
          sorter: true,
          width: 180,
        },
      ],
      tableName: 'BAS_ITEM',
      rowKey: 'ITEM_CODE',
    });
  }