Show per-item company on multi-company order pricing and detail.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -76,6 +76,8 @@ export interface OrderItem {
|
|||||||
confirmedMeterage: number | null
|
confirmedMeterage: number | null
|
||||||
supplyPrice: number | null
|
supplyPrice: number | null
|
||||||
totalAmount: number | null
|
totalAmount: number | null
|
||||||
|
companyId?: string
|
||||||
|
companyName?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Order {
|
export interface Order {
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ async function loadOrder() {
|
|||||||
confirmedMeterage: item.confirmedMeterage,
|
confirmedMeterage: item.confirmedMeterage,
|
||||||
supplyPrice: item.supplyPrice,
|
supplyPrice: item.supplyPrice,
|
||||||
totalAmount: item.totalAmount,
|
totalAmount: item.totalAmount,
|
||||||
|
companyId: item.companyId,
|
||||||
|
companyName: item.companyName,
|
||||||
}))
|
}))
|
||||||
shippingCost.value = data.shippingCost ?? 0
|
shippingCost.value = data.shippingCost ?? 0
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -129,6 +131,8 @@ function submitAddProduct() {
|
|||||||
confirmedMeterage: form.confirmedMeterage || form.requestedMeterage,
|
confirmedMeterage: form.confirmedMeterage || form.requestedMeterage,
|
||||||
supplyPrice: null,
|
supplyPrice: null,
|
||||||
totalAmount: null,
|
totalAmount: null,
|
||||||
|
companyId: order.value?.companyId,
|
||||||
|
companyName: order.value?.companyName,
|
||||||
})
|
})
|
||||||
|
|
||||||
closeAddModal()
|
closeAddModal()
|
||||||
@@ -163,6 +167,8 @@ async function savePricing() {
|
|||||||
confirmedMeterage: item.confirmedMeterage,
|
confirmedMeterage: item.confirmedMeterage,
|
||||||
supplyPrice: item.supplyPrice,
|
supplyPrice: item.supplyPrice,
|
||||||
totalAmount: item.totalAmount,
|
totalAmount: item.totalAmount,
|
||||||
|
companyId: item.companyId,
|
||||||
|
companyName: item.companyName,
|
||||||
}))
|
}))
|
||||||
toast.success('قیمتگذاری ذخیره شد.')
|
toast.success('قیمتگذاری ذخیره شد.')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -270,6 +276,7 @@ async function sendInvoice() {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ردیف</th>
|
<th>ردیف</th>
|
||||||
|
<th>شرکت</th>
|
||||||
<th>کالیته</th>
|
<th>کالیته</th>
|
||||||
<th>محصول</th>
|
<th>محصول</th>
|
||||||
<th>رنگ / نوع</th>
|
<th>رنگ / نوع</th>
|
||||||
@@ -283,6 +290,7 @@ async function sendInvoice() {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item, index) in items" :key="item.id">
|
<tr v-for="(item, index) in items" :key="item.id">
|
||||||
<td>{{ index + 1 }}</td>
|
<td>{{ index + 1 }}</td>
|
||||||
|
<td>{{ item.companyName || order?.companyName || '—' }}</td>
|
||||||
<td>{{ item.catalogCode }}</td>
|
<td>{{ item.catalogCode }}</td>
|
||||||
<td>{{ item.productName }}</td>
|
<td>{{ item.productName }}</td>
|
||||||
<td>{{ item.color }}</td>
|
<td>{{ item.color }}</td>
|
||||||
@@ -328,6 +336,7 @@ async function sendInvoice() {
|
|||||||
<span class="pricing-page__item-index">#{{ index + 1 }}</span>
|
<span class="pricing-page__item-index">#{{ index + 1 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin-card-item__meta">
|
<div class="admin-card-item__meta">
|
||||||
|
<span v-if="item.companyName || order?.companyName">{{ item.companyName || order?.companyName }}</span>
|
||||||
<span>کالیته {{ item.catalogCode }}</span>
|
<span>کالیته {{ item.catalogCode }}</span>
|
||||||
<span>{{ item.color }}</span>
|
<span>{{ item.color }}</span>
|
||||||
<span>درخواست: {{ formatNumber(item.requestedMeterage) }} متر</span>
|
<span>درخواست: {{ formatNumber(item.requestedMeterage) }} متر</span>
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ function submitStatus() {
|
|||||||
<table class="admin-table admin-table--compact">
|
<table class="admin-table admin-table--compact">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>شرکت</th>
|
||||||
<th>کالیته</th>
|
<th>کالیته</th>
|
||||||
<th>محصول</th>
|
<th>محصول</th>
|
||||||
<th>رنگ</th>
|
<th>رنگ</th>
|
||||||
@@ -223,6 +224,7 @@ function submitStatus() {
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in order.items" :key="item.id">
|
<tr v-for="item in order.items" :key="item.id">
|
||||||
|
<td>{{ item.companyName || order.companyName }}</td>
|
||||||
<td>{{ item.catalogCode }}</td>
|
<td>{{ item.catalogCode }}</td>
|
||||||
<td>{{ item.productName }}</td>
|
<td>{{ item.productName }}</td>
|
||||||
<td>{{ item.color }}</td>
|
<td>{{ item.color }}</td>
|
||||||
@@ -241,6 +243,7 @@ function submitStatus() {
|
|||||||
<span>{{ item.catalogCode }}</span>
|
<span>{{ item.catalogCode }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-detail__item-meta">
|
<div class="order-detail__item-meta">
|
||||||
|
<span v-if="item.companyName">{{ item.companyName }}</span>
|
||||||
<span>{{ item.color }}</span>
|
<span>{{ item.color }}</span>
|
||||||
<span>{{ formatMeterage(item.confirmedMeterage ?? item.requestedMeterage) }}</span>
|
<span>{{ formatMeterage(item.confirmedMeterage ?? item.requestedMeterage) }}</span>
|
||||||
<span v-if="item.supplyPrice != null">{{ formatCurrency(item.supplyPrice) }}</span>
|
<span v-if="item.supplyPrice != null">{{ formatCurrency(item.supplyPrice) }}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user