feat(pl): 装送货段增加同市标记,并同步额度证件与计划表单。
同市易制毒段只校验购买证;同步 Web/H5 表单、额度统计展示与相关回归测试。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d58f6ea5bd
commit
522b4be705
40 files changed
+576
-107
No files matched your search
@@ -162,6 +162,15 @@
|
||||
@update:model-value="patchDelivery(index, { notes: $event })"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否同市" class="form-col-span-2">
|
||||
<el-checkbox
|
||||
:model-value="delivery.sameCity === 1"
|
||||
:disabled="readonly"
|
||||
@update:model-value="(checked) => patchDelivery(index, { sameCity: checked ? 1 : 0 })"
|
||||
>
|
||||
同市只需购买证
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="地磅单" class="form-col-span-2">
|
||||
<div class="pl-plan-dibang-row">
|
||||
<el-checkbox
|
||||
|
||||
@@ -714,6 +714,7 @@
|
||||
mergePlanProductsFromLoadMirror,
|
||||
shouldRetainPlanProductsWhileLoadEmpty,
|
||||
resolveStopDibangDefaults,
|
||||
toxicStopCertBindingMessage,
|
||||
sumStopProductsPlanQty,
|
||||
type PlanDeliveryForm,
|
||||
type PlanLoadForm,
|
||||
@@ -2619,19 +2620,7 @@
|
||||
}
|
||||
|
||||
function toxicContractCertBindingMessage(rows: QuotaSourceOption[]) {
|
||||
const missing = new Map<string, string>()
|
||||
for (const row of rows) {
|
||||
if (isPlInternalCustomerName(row.partyName)) continue
|
||||
const certificates = row.certificates || []
|
||||
const ready =
|
||||
certificates.some((cert) => cert.certType === 'purchase') &&
|
||||
certificates.some((cert) => cert.certType === 'transport')
|
||||
if (ready) continue
|
||||
const key = row.contractId || row.contractNo || row.productName || row.sourceStopProductId
|
||||
missing.set(key, row.contractNo || '未编号合同')
|
||||
}
|
||||
if (!missing.size) return ''
|
||||
return `合同${[...missing.values()].join('、')}尚未绑定购买证和运输证,请先到合同中绑定后再安排运输`
|
||||
return toxicStopCertBindingMessage(rows)
|
||||
}
|
||||
|
||||
async function performArrangeAfterSave(
|
||||
|
||||
@@ -110,6 +110,15 @@
|
||||
@update:model-value="patch({ notes: $event })"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否同市" class="form-col-span-2">
|
||||
<el-checkbox
|
||||
:model-value="modelValue.sameCity === 1"
|
||||
:disabled="readonly"
|
||||
@update:model-value="patch({ sameCity: $event ? 1 : 0 })"
|
||||
>
|
||||
同市只需购买证
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="地磅单" class="form-col-span-2">
|
||||
<div class="pl-plan-dibang-row">
|
||||
<el-checkbox
|
||||
|
||||
@@ -78,7 +78,15 @@
|
||||
<section v-if="faceTabs.length" class="quota-face">
|
||||
<h3 class="dialog-section-title">关联证件证面</h3>
|
||||
<el-tabs v-model="faceTab" class="quota-face-tabs">
|
||||
<el-tab-pane v-for="tab in faceTabs" :key="tab.key" :label="tab.label" :name="tab.key">
|
||||
<el-tab-pane v-for="tab in faceTabs" :key="tab.key" :name="tab.key">
|
||||
<template #label>
|
||||
<span class="quota-kind-line">
|
||||
<el-tag size="small" :type="certKindTagType(tab.kind)">{{
|
||||
certKindLabel(tab.kind)
|
||||
}}</el-tag>
|
||||
<span>{{ tab.certNo }}</span>
|
||||
</span>
|
||||
</template>
|
||||
<p v-if="!tab.cert" class="quota-note">没有读到这张证的证面档案。</p>
|
||||
<template v-else>
|
||||
<section
|
||||
@@ -209,12 +217,9 @@
|
||||
<div class="conversion-grid">
|
||||
<section v-for="row in group.rows" :key="conversionKey(row)" class="conversion-card">
|
||||
<div class="conversion-card-head">
|
||||
<el-tag
|
||||
size="small"
|
||||
effect="plain"
|
||||
:type="row.cert.certType === 'purchase' ? 'success' : 'primary'"
|
||||
>{{ row.cert.certType === 'purchase' ? '购买证' : '运输证' }}</el-tag
|
||||
>
|
||||
<el-tag size="small" :type="certKindTagType(row.cert.certType)">{{
|
||||
certKindLabel(row.cert.certType)
|
||||
}}</el-tag>
|
||||
<strong>{{ row.cert.certNo }}</strong>
|
||||
</div>
|
||||
<label>换算系数</label>
|
||||
@@ -286,7 +291,12 @@
|
||||
>
|
||||
</div>
|
||||
<div v-for="item in selected" :key="item.kind + item.cert.id" class="view-section">
|
||||
<h4>{{ item.kind === 'purchase' ? '购买证' : '运输证' }} · {{ item.cert.certNo }}</h4>
|
||||
<h4 class="quota-kind-line">
|
||||
<el-tag size="small" :type="certKindTagType(item.kind)">{{
|
||||
certKindLabel(item.kind)
|
||||
}}</el-tag>
|
||||
<span>{{ item.cert.certNo }}</span>
|
||||
</h4>
|
||||
<p
|
||||
>{{ item.cert.buyerName || item.cert.shipperName }} →
|
||||
{{ item.cert.sellerName || item.cert.consigneeName }};有效期
|
||||
@@ -393,10 +403,12 @@
|
||||
:key="row.certType + row.unit"
|
||||
class="view-section"
|
||||
>
|
||||
<strong
|
||||
>{{ row.certType === 'purchase' ? '购买证' : '运输证' }} · 需求
|
||||
{{ qtyText(row.demand) }} {{ unitText(row.unit) }}</strong
|
||||
>
|
||||
<div class="quota-kind-line">
|
||||
<el-tag size="small" :type="certKindTagType(row.certType)">{{
|
||||
certKindLabel(row.certType)
|
||||
}}</el-tag>
|
||||
<strong>需求 {{ qtyText(row.demand) }} {{ unitText(row.unit) }}</strong>
|
||||
</div>
|
||||
<p v-if="row.availableUpperBound !== null">
|
||||
适用余额至多 {{ qtyText(row.availableUpperBound) }}
|
||||
{{ unitText(row.unit) }};缺口至少 {{ qtyText(row.gapLowerBound) }}
|
||||
@@ -408,7 +420,13 @@
|
||||
}}</p>
|
||||
</div>
|
||||
<el-table :data="allocations" stripe
|
||||
><el-table-column prop="kind" label="证种" min-width="90" /><el-table-column
|
||||
><el-table-column label="证种" min-width="110"
|
||||
><template #default="{ row }"
|
||||
><el-tag size="small" :type="row.kind === '运输证' ? 'warning' : 'success'">{{
|
||||
row.kind
|
||||
}}</el-tag></template
|
||||
></el-table-column
|
||||
><el-table-column
|
||||
prop="certNo"
|
||||
label="证号"
|
||||
min-width="160" /><el-table-column
|
||||
@@ -493,6 +511,7 @@
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { useDictStore } from '@/store/modules/dict'
|
||||
import { getProductUnitLabel } from '@/utils/crm-product-display'
|
||||
import { certKindLabel, certKindTagType } from '@/views/pl/quota-cert/cert-list-face'
|
||||
import ViewKvTable from '@/components/business/system-view-dialog/ViewKvTable.vue'
|
||||
import type { ViewField } from '@/components/business/system-view-dialog/types'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
@@ -631,7 +650,7 @@
|
||||
kind,
|
||||
cert,
|
||||
certNo: number,
|
||||
label: `${kind === 'purchase' ? '购买证' : '运输证'} ${number}`
|
||||
label: `${certKindLabel(kind)} ${number}`
|
||||
})
|
||||
}
|
||||
for (const row of plan.value?.stopProducts || []) {
|
||||
@@ -1059,6 +1078,14 @@
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
.quota-kind-line {
|
||||
display: inline-flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.quota-dialog :deep(.el-select) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user