fix(frontend)+chore(deploy): 修复明细表格渲染 + static/ 改服务器构建

- SalesOrdersTab/PurchaseOrdersTab/MaterialsTab/ProductsTab: t-table 明细行不渲染(push/splice 改新数组引用)+ Decimal 算术类型错误(Number() 包裹)
- static/ 不再进 git(.gitignore),改为 deploy.sh 在服务器 npm run build
- 新增 deploy.sh:拉取 + 构建前端 + 重启后端
This commit is contained in:
2026-08-03 16:12:34 +08:00
parent 4ec6f98f10
commit eab4137c0a
39 changed files with 55 additions and 173 deletions
@@ -98,16 +98,16 @@ async function openRestockModal() {
}
function addRestockItem() {
restockItems.value.push({
restockItems.value = [...restockItems.value, {
material_id: state.materials[0]?.id || null,
quantity: 1,
unit_price: 0,
remark: ''
})
}]
}
function removeRestockItem(index: number) {
restockItems.value.splice(index, 1)
restockItems.value = restockItems.value.filter((_, i) => i !== index)
}
const restockTotalAmount = computed(() => {
@@ -51,14 +51,14 @@ async function editProduct(product: any) {
}
function addBomItem() {
bomItems.value.push({
bomItems.value = [...bomItems.value, {
material_id: state.materials[0]?.id || null,
quantity: 1
})
}]
}
function removeBomItem(index: number) {
bomItems.value.splice(index, 1)
bomItems.value = bomItems.value.filter((_, i) => i !== index)
}
async function saveProduct() {
@@ -101,15 +101,15 @@ function openCreateOrder() {
}
function addOrderItem() {
orderItems.value.push({
orderItems.value = [...orderItems.value, {
product_id: state.materials[0]?.id || null,
quantity: 1,
remark: ''
})
}]
}
function removeOrderItem(index: number) {
orderItems.value.splice(index, 1)
orderItems.value = orderItems.value.filter((_, i) => i !== index)
}
const orderTotalAmount = computed(() => {
@@ -66,7 +66,7 @@ function openCreateOrder() {
}
function addMoldItem() {
moldItems.value.push({
moldItems.value = [...moldItems.value, {
mold_mode: 'new',
mold_sku: '',
mold_name: '',
@@ -74,11 +74,11 @@ function addMoldItem() {
quantity: 1,
unit_price: 0,
remark: ''
})
}]
}
function removeMoldItem(index: number) {
moldItems.value.splice(index, 1)
moldItems.value = moldItems.value.filter((_, i) => i !== index)
}
const orderTotalAmount = computed(() => {
@@ -263,15 +263,15 @@ function openConsumptionModal() {
}
function addConsumptionItem() {
consumptionItems.value.push({
consumptionItems.value = [...consumptionItems.value, {
material_id: state.materials[0]?.id || null,
quantity: 1,
remark: ''
})
}]
}
function removeConsumptionItem(index: number) {
consumptionItems.value.splice(index, 1)
consumptionItems.value = consumptionItems.value.filter((_, i) => i !== index)
}
const consumptionTotalAmount = computed(() => {