| | |
| | | import { ref, computed, getCurrentInstance, onMounted, onUnmounted, nextTick } from "vue"; |
| | | import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue"; |
| | | import { findProcessRouteItemList, addOrUpdateProcessRouteItem, sortProcessRouteItem, batchDeleteProcessRouteItem } from "@/api/productionManagement/processRouteItem.js"; |
| | | import { findProductProcessRouteItemList } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import { processList } from "@/api/productionManagement/productionProcess.js"; |
| | | import { useRoute } from 'vue-router' |
| | | import { ElMessageBox } from 'element-plus' |
| | |
| | | const { proxy } = getCurrentInstance() || {}; |
| | | |
| | | const routeId = computed(() => route.query.id); |
| | | const orderId = computed(() => route.query.orderId); |
| | | const pageType = computed(() => route.query.type); |
| | | |
| | | const tableLoading = ref(false); |
| | | const tableData = ref([]); |
| | |
| | | // 获取列表 |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | findProcessRouteItemList({ routeId: routeId.value }) |
| | | const listPromise = |
| | | pageType.value === "order" |
| | | ? findProductProcessRouteItemList({ orderId: orderId.value }) |
| | | : findProcessRouteItemList({ routeId: routeId.value }); |
| | | |
| | | listPromise |
| | | .then(res => { |
| | | tableData.value = res.data || []; |
| | | tableLoading.value = false; |