fix: product service info

This commit is contained in:
puriphatt 2024-10-07 10:51:34 +07:00
parent b11c57d9cb
commit 862eee9735

View file

@ -178,6 +178,7 @@ function mapNode() {
opened: v.work.length > 0,
checked: true,
icon: 'mdi-server-outline',
attributes: v.attributes,
bg: 'hsla(var(--orange-5-hsl)/0.1)',
fg: 'var(--orange-5)',
children: (function () {
@ -189,6 +190,8 @@ function mapNode() {
id: p.product.id,
title: p.product.name,
subtitle: p.product.code || ' ',
detail: p.product.detail,
remark: p.product.remark,
value: {
vat: 0,
pricePerUnit: 0,
@ -213,11 +216,14 @@ function mapNode() {
subtitle: ' ',
opened: w.productOnWork.length > 0,
checked: true,
attributes: w.attributes,
children: w.productOnWork.map((p) => ({
id: p.product.id,
title: p.product.name,
subtitle: p.product.code || ' ',
checked: true,
detail: p.product.detail,
remark: p.product.remark,
value: {
vat: 0,
pricePerUnit: 0,
@ -238,6 +244,8 @@ function mapNode() {
id: v.id,
title: v.name,
subtitle: v.code,
detail: v.detail,
remark: v.remark,
value: {
vat: 0,
pricePerUnit: 0,
@ -584,7 +592,7 @@ watch(
}}
</span>
<aside class="surface-3 q-pa-md">
{{ selectedNode[0].raw.detail || '-' }}
{{ selectedNode[0].detail || '-' }}
</aside>
</span>
@ -609,17 +617,16 @@ watch(
"
class="surface-3 q-pa-md"
>
{{ selectedNode[0].raw.remark || '-' }}
{{ selectedNode[0].remark || '-' }}
</aside>
<aside v-else class="q-pt-md row q-gutter-sm">
<template
v-if="
selectedNode[0].raw.attributes.additional
.length > 0
selectedNode[0].attributes.additional.length > 0
"
>
<div
v-for="att in selectedNode[0].raw.attributes
v-for="att in selectedNode[0].attributes
.additional"
:key="att"
class="bordered q-py-xs q-px-sm rounded"