gaoluyang
21 小时以前 4c6f9bcc9b3f8bdf5298d73d1035bad529f86d69
src/views/inventoryManagement/dispatchLog/index.vue
@@ -14,25 +14,33 @@
<script setup>
import Record from "@/views/inventoryManagement/dispatchLog/Record.vue";
const activeTab = ref('qualified')
const type = ref(0)
import { computed, ref } from "vue";
const activeTab = ref('selfMade')
const type = ref(1)
const tabs = computed(() => {
  return [
    {
      label: '合格出库',
      name: 'qualified',
      type: '0'
      label: '自制',
      name: 'selfMade',
      type: 1
    },
    {
      label: '不合格出库',
      name: 'unqualified',
      type: '1'
      label: '外购',
      name: 'purchase',
      type: 2
    },
    {
      label: '委外',
      name: 'outsourcing',
      type: 3
    }
  ]
})
const handleTabChange = (tabName) => {
  activeTab.value = tabName;
  type.value = tabName === 'qualified' ? 0 : 1
  const tab = tabs.value.find(t => t.name === tabName);
  type.value = tab ? tab.type : 1;
}
</script>