feat(pl): 增加百链充值类型,并保留计划产品与证件上传时间。
充值单号按类型使用 ETC、YK、SX、BL 前缀;更换装货客户清空产品时不抹掉已有计划产品;运输证件列表展示上传时间。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
af8d4d90fa
commit
cc5cf78bcd
21 files changed
+274
-97
No files matched your search
@@ -14,30 +14,49 @@
|
||||
<div class="mp-wv-card__head">
|
||||
<div>
|
||||
<div class="mp-wv-card__no">{{ row.certNo }}</div>
|
||||
<div class="mp-wv-card__sub">{{ row.certType === 'transport' ? '运输证' : '购买证' }}</div>
|
||||
<div class="mp-wv-card__sub">{{
|
||||
row.certType === 'transport' ? '运输证' : '购买证'
|
||||
}}</div>
|
||||
</div>
|
||||
<span class="status-tag" :class="`status-tag--${statusTag(row.status)}`">{{ statusLabel(row.status) }}</span>
|
||||
<span class="status-tag" :class="`status-tag--${statusTag(row.status)}`">{{
|
||||
statusLabel(row.status)
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="mp-wv-card__kv">
|
||||
<div class="mp-wv-card__kv-row"><span>销售单位</span><span>{{ salePartyName(row) || '—' }}</span></div>
|
||||
<div class="mp-wv-card__kv-row"><span>购买单位</span><span>{{ buyPartyName(row) || '—' }}</span></div>
|
||||
<div class="mp-wv-card__kv-row"><span>有效次数</span><span>{{ row.validUseText || '—' }}</span></div>
|
||||
<div class="mp-wv-card__kv">
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>销售单位</span><span>{{ salePartyName(row) || '—' }}</span></div
|
||||
>
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>购买单位</span><span>{{ buyPartyName(row) || '—' }}</span></div
|
||||
>
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>有效次数</span><span>{{ row.validUseText || '—' }}</span></div
|
||||
>
|
||||
<div class="mp-wv-card__kv-row">
|
||||
<span>是否预警</span>
|
||||
<span v-if="warningText(row)" class="status-tag status-tag--danger">{{ warningText(row) }}</span>
|
||||
<span v-if="warningText(row)" class="status-tag status-tag--danger">{{
|
||||
warningText(row)
|
||||
}}</span>
|
||||
<span v-else>—</span>
|
||||
</div>
|
||||
<div class="mp-wv-card__kv-row"><span>品名</span><span>{{ row.productNameOnCert || '—' }}</span></div>
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>品名</span><span>{{ row.productNameOnCert || '—' }}</span></div
|
||||
>
|
||||
<div class="mp-wv-card__kv-row">
|
||||
<span>数量</span><span>{{ qty(row.totalQty) }} {{ unit(row.quantityUnit) }}</span>
|
||||
</div>
|
||||
<div class="mp-wv-card__kv-row">
|
||||
<span>可用余额</span><span>{{ qty(row.availableQty) }} {{ unit(row.quantityUnit) }}</span>
|
||||
</div>
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>上传时间</span><span>{{ uploadTime(row.createTime) }}</span></div
|
||||
>
|
||||
</div>
|
||||
<div class="mp-wv-card-actions" @click.stop>
|
||||
<button class="mp-wv-btn" type="button" @click="open(row)">查看</button>
|
||||
<button v-if="canEdit" class="mp-wv-btn mp-wv-btn--primary" type="button" @click="edit(row)">编辑</button>
|
||||
<button v-if="canEdit" class="mp-wv-btn mp-wv-btn--primary" type="button" @click="edit(row)"
|
||||
>编辑</button
|
||||
>
|
||||
<button
|
||||
v-if="canEdit && row.status !== 'void' && row.status !== 'closed'"
|
||||
class="mp-wv-btn"
|
||||
@@ -70,9 +89,13 @@
|
||||
>
|
||||
新增运输证
|
||||
</button>
|
||||
<button class="mp-wv-speed-item primary" type="button" @click="create('purchase')">新增购买证</button>
|
||||
<button class="mp-wv-speed-item primary" type="button" @click="create('purchase')"
|
||||
>新增购买证</button
|
||||
>
|
||||
</div>
|
||||
<button class="mp-wv-speed-main" type="button" aria-label="新增证件" @click="onCreate">+</button>
|
||||
<button class="mp-wv-speed-main" type="button" aria-label="新增证件" @click="onCreate"
|
||||
>+</button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</main>
|
||||
@@ -82,6 +105,7 @@
|
||||
import { quotaCertApi, type CertType, type QuotaCert } from '@/api/pl/quota-cert'
|
||||
import ArchiveForm from './archive-form.vue'
|
||||
import CertConfirmSheet from './CertConfirmSheet.vue'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
import { formatCertQty } from '@/views/pl/quota-cert/model'
|
||||
import { buyPartyName, expiryWarning, salePartyName } from '@/views/pl/quota-cert/cert-list-face'
|
||||
import { useDictStore } from '@/store/modules/dict'
|
||||
@@ -115,7 +139,9 @@
|
||||
return !props.expiringSoon || Boolean(expiryWarning(row.validTo))
|
||||
})
|
||||
)
|
||||
const expiringCount = computed(() => rows.value.filter((row) => expiryWarning(row.validTo)).length)
|
||||
const expiringCount = computed(
|
||||
() => rows.value.filter((row) => expiryWarning(row.validTo)).length
|
||||
)
|
||||
watch(expiringCount, (count) => emit('expiring-count', count), { immediate: true })
|
||||
let epoch = 0
|
||||
|
||||
@@ -134,6 +160,9 @@
|
||||
function qty(value: unknown) {
|
||||
return formatCertQty(value)
|
||||
}
|
||||
function uploadTime(value?: string | null) {
|
||||
return formatDateTime(value) || '—'
|
||||
}
|
||||
function unit(value?: string | null) {
|
||||
const label = getProductUnitLabel(useDictStore().getLabel, value)
|
||||
return !label || label === '—' ? '' : label
|
||||
|
||||
Reference in new issue
Block a user