x
This commit is contained in:
@@ -83,8 +83,6 @@ import { useRouter } from 'vue-router'
|
||||
import { apiRequest } from '@/shared/api'
|
||||
import { Chart, registerables } from 'chart.js'
|
||||
|
||||
Chart.register(...registerables)
|
||||
|
||||
const router = useRouter()
|
||||
const chartCanvas = ref<HTMLCanvasElement | null>(null)
|
||||
let chartInstance: Chart | null = null
|
||||
@@ -206,6 +204,7 @@ const renderChart = () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
Chart.register(...registerables)
|
||||
loadAluminumPrice()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useInventory } from '../composables/useInventory'
|
||||
import { handleApiError } from '@/shared/notification'
|
||||
|
||||
@@ -34,6 +34,10 @@ function refreshFinance() {
|
||||
loadFinance()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
refreshFinance()
|
||||
})
|
||||
|
||||
const totalReceivable = computed(() => {
|
||||
return state.financeSummary?.total_receivable ?? 0
|
||||
})
|
||||
@@ -65,8 +69,6 @@ function getTransactionStatusLabel(status: string): string {
|
||||
}
|
||||
return map[status] || status
|
||||
}
|
||||
|
||||
refreshFinance()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -155,8 +157,8 @@ refreshFinance()
|
||||
<el-table-column label="应收余额">
|
||||
<template #default="{ row }">{{ formatCurrency(row.receivable_balance) }}</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.customerFinanceStatement.length === 0" description="暂无数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.customerFinanceStatement.length === 0" description="暂无数据" />
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-bottom: 16px;">
|
||||
@@ -179,8 +181,8 @@ refreshFinance()
|
||||
<el-table-column label="应付余额">
|
||||
<template #default="{ row }">{{ formatCurrency(row.payable_balance) }}</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.supplierFinanceStatement.length === 0" description="暂无数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.supplierFinanceStatement.length === 0" description="暂无数据" />
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-bottom: 16px;">
|
||||
@@ -202,8 +204,8 @@ refreshFinance()
|
||||
<el-table-column label="未结款">
|
||||
<template #default="{ row }">{{ formatCurrency(row.unsettled_amount) }}</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.customerProductStatement.length === 0" description="暂无数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.customerProductStatement.length === 0" description="暂无数据" />
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-bottom: 16px;">
|
||||
@@ -225,8 +227,8 @@ refreshFinance()
|
||||
<el-table-column label="未结款">
|
||||
<template #default="{ row }">{{ formatCurrency(row.unsettled_amount) }}</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.supplierProductStatement.length === 0" description="暂无数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.supplierProductStatement.length === 0" description="暂无数据" />
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -256,8 +258,8 @@ refreshFinance()
|
||||
<el-table-column label="日期">
|
||||
<template #default="{ row }">{{ formatDate(row.transaction_date) }}</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.financeTransactions.length === 0" description="暂无数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.financeTransactions.length === 0" description="暂无数据" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -197,8 +197,8 @@ function closeRestockModal() {
|
||||
<el-button type="danger" size="small" @click="deleteMaterial(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.materials.length === 0" description="暂无物料数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.materials.length === 0" description="暂无物料数据" />
|
||||
|
||||
<el-dialog
|
||||
v-model="showModal"
|
||||
|
||||
@@ -148,8 +148,8 @@ function closeModal() {
|
||||
<el-button type="danger" size="small" @click="deleteProduct(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.finishedProducts.length === 0" description="暂无成品数据" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.finishedProducts.length === 0" description="暂无成品数据" />
|
||||
|
||||
<el-dialog
|
||||
v-model="showModal"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useInventory } from '../composables/useInventory'
|
||||
import { apiRequest } from '@/shared/api'
|
||||
import { addNotification, handleApiError } from '@/shared/notification'
|
||||
@@ -232,12 +232,14 @@ function closeReceiveModal() {
|
||||
}
|
||||
|
||||
async function initData() {
|
||||
await loadPurchaseOrders()
|
||||
await loadMaterials()
|
||||
await loadSuppliers()
|
||||
await loadPurchaseOrders()
|
||||
}
|
||||
|
||||
initData()
|
||||
onMounted(() => {
|
||||
initData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -324,8 +326,8 @@ initData()
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.purchaseOrders.length === 0" description="暂无采购订单" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.purchaseOrders.length === 0" description="暂无采购订单" />
|
||||
|
||||
<el-dialog
|
||||
v-model="showModal"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useInventory } from '../composables/useInventory'
|
||||
import { apiRequest } from '@/shared/api'
|
||||
import { addNotification, handleApiError } from '@/shared/notification'
|
||||
@@ -260,13 +260,15 @@ function closeConsumptionModal() {
|
||||
}
|
||||
|
||||
async function initData() {
|
||||
await loadProductionOrders()
|
||||
await loadCustomers()
|
||||
await loadMaterials()
|
||||
await loadFinishedProducts()
|
||||
await loadProductionOrders()
|
||||
}
|
||||
|
||||
initData()
|
||||
onMounted(() => {
|
||||
initData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -344,8 +346,8 @@ initData()
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-empty v-if="!state.loading && state.productionOrders.length === 0" description="暂无销售订单" />
|
||||
</el-table>
|
||||
<el-empty v-if="!state.loading && state.productionOrders.length === 0" description="暂无销售订单" />
|
||||
|
||||
<el-dialog
|
||||
v-model="showModal"
|
||||
|
||||
@@ -383,7 +383,6 @@ const uploadFile = async () => {
|
||||
}
|
||||
|
||||
const startPolling = async (taskId: string) => {
|
||||
console.log('[Polling] 开始轮询任务:', taskId)
|
||||
state.polling = true
|
||||
state.progress = 10
|
||||
let pollCount = 0
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
></iframe>
|
||||
</div>
|
||||
|
||||
<div id="preview-3d" v-else class="viewer-section viewer-section-hero">
|
||||
<div id="preview-3d-placeholder" v-else class="viewer-section viewer-section-hero">
|
||||
<div class="summary-header">
|
||||
<h3>3D 预览</h3>
|
||||
<span class="badge badge-warning">未生成</span>
|
||||
@@ -631,14 +631,8 @@ const camControllerOptions = [
|
||||
]
|
||||
|
||||
const loadTask = async () => {
|
||||
console.log('[ResultView] loadTask 开始, taskId:', route.params.taskId)
|
||||
try {
|
||||
state.task = await apiRequest<TaskData>(`/api/status/${route.params.taskId}`, { method: 'POST' })
|
||||
console.log('任务数据:', state.task)
|
||||
console.log('key_info:', state.task.key_info)
|
||||
console.log('cavity_data:', state.task.cavity_data)
|
||||
console.log('analysis_result:', state.task.analysis_result)
|
||||
console.log('geometry_data:', (state.task as any).geometry_data)
|
||||
if (state.task?.best_scheme_id) {
|
||||
state.selectedSchemeId = state.task.best_scheme_id
|
||||
} else if (state.task?.candidate_schemes?.length) {
|
||||
|
||||
Reference in New Issue
Block a user