fix(pl): 用合同与来源主体信息替代用量追踪表中的技术标识。
This commit is contained in:
1 parent
72cf0d9c3d
commit
da56a1e319
5 files changed
+118
-6
No files matched your search
@@ -331,6 +331,8 @@ export interface ContractStatistics extends ContractOption {
|
||||
certificates: (CertificateStatisticsSummary & StatisticsBinding & { productNames: string[] })[]
|
||||
}
|
||||
export interface StatisticsUsageItem {
|
||||
partyName?: string | null
|
||||
address?: string | null
|
||||
id: string
|
||||
usageId: string
|
||||
certType: CertType
|
||||
|
||||
@@ -62,17 +62,18 @@
|
||||
<StatisticsProducts :products="item.products" :quantity-unit="certificate.quantityUnit" />
|
||||
</section>
|
||||
<h3>计划段产品用量追踪</h3>
|
||||
<el-table :data="certificate.usageItems" stripe class="list-table" row-key="id">
|
||||
<el-table :data="usageRows" stripe class="list-table" row-key="id">
|
||||
<el-table-column prop="planNo" label="计划编号" min-width="180" />
|
||||
<el-table-column label="段次" min-width="150"
|
||||
><template #default="{ row }"
|
||||
><el-tag size="small">{{ row.stopType === 'load' ? '装货' : '卸货' }}</el-tag>
|
||||
{{ row.stopId }}</template
|
||||
></el-table-column
|
||||
><el-tag size="small">{{ row.stopType === 'load' ? '装货' : '送货' }}</el-tag>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column prop="productName" label="产品" min-width="160" />
|
||||
<el-table-column prop="stopProductId" label="段产品标识" min-width="180" />
|
||||
<el-table-column prop="contractProductId" label="合同产品标识" min-width="180" />
|
||||
<el-table-column prop="contractNo" label="合同编号" min-width="180" />
|
||||
<el-table-column prop="productModel" label="规格" min-width="140" />
|
||||
<el-table-column prop="partyName" label="装货 / 送货主体" min-width="180" />
|
||||
<el-table-column prop="address" label="装货 / 送货地址" min-width="200" />
|
||||
<el-table-column prop="quantityUnit" label="单位" min-width="90" />
|
||||
<el-table-column prop="reservedQty" label="预占" min-width="120" />
|
||||
<el-table-column prop="usedQty" label="已用" min-width="120" />
|
||||
@@ -99,4 +100,19 @@
|
||||
const certificate = computed(() =>
|
||||
props.mode === 'certificate' ? (props.detail as CertificateStatistics) : undefined
|
||||
)
|
||||
const usageRows = computed(() =>
|
||||
(certificate.value?.usageItems || []).map((item) => {
|
||||
const contract = certificate.value?.contracts.find((row) => row.id === item.contractId)
|
||||
const product = contract?.products.find(
|
||||
(row) => row.contractProductId === item.contractProductId
|
||||
)
|
||||
return {
|
||||
...item,
|
||||
contractNo: contract?.contractNo || '—',
|
||||
productModel: product?.model || '—',
|
||||
partyName: item.partyName || '—',
|
||||
address: item.address || '—'
|
||||
}
|
||||
})
|
||||
)
|
||||
</script>
|
||||
Reference in new issue
Block a user