merge origin/dev and resolve frontend conflicts
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { computed, onMounted, reactive, ref, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ArrowLeft, Download, Eye, Plus, Search, Trash2, Upload } from '@lucide/vue'
|
||||
import SingleLineText from '@/components/common/SingleLineText.vue'
|
||||
import {
|
||||
createDiscard, createRelabel, createTransfer, getDiscard, getRelabel, getTransfer,
|
||||
listDiscardCandidates, listDiscards, listLastlegOrders, listRelabelInventoryCandidates, listRelabels, listTransfers,
|
||||
@@ -236,15 +237,6 @@ function selectDiscardInbound(orderId: string) {
|
||||
}
|
||||
function dateTime(value: string, end = false) { return value ? `${value}T${end ? '23:59:59' : '00:00:00'}` : undefined }
|
||||
function row(values: Array<string | number | undefined | null>) { return Object.fromEntries(values.map((value, index) => [String(index), value == null || value === '' ? '—' : String(value)])) }
|
||||
function statusLabel(value: string) {
|
||||
return statusOptions.value.find((option) => option.value === value)?.label || value
|
||||
}
|
||||
function deliveryMethodLabel(value: string) {
|
||||
return ({ TRUCK: '卡车派送', EXPRESS: '快递派送', '卡车派送': '卡车派送', '快递派送': '快递派送' } as Record<string, string>)[value] || value
|
||||
}
|
||||
function formatDateTime(value: string) {
|
||||
return value ? value.replace('T', ' ').slice(0, 19) : '—'
|
||||
}
|
||||
function warehouseDisplay(value?: string) {
|
||||
if (!value) return '—'
|
||||
return value.split(',').map((code) => {
|
||||
@@ -252,6 +244,23 @@ function warehouseDisplay(value?: string) {
|
||||
return warehouse ? warehouseLabel(warehouse) : code
|
||||
}).join('、')
|
||||
}
|
||||
function statusLabel(value: string) {
|
||||
const labels: Record<string, string> = {
|
||||
|
||||
PENDING_PROCESSING: '待处理', PROCESSING: '处理中', COMPLETED: '已完成', CANCELLED: '已取消',
|
||||
PENDING_REVIEW: '待审核', APPROVED: '已通过', REJECTED: '已拒绝', PENDING_ASSIGNMENT: '待分配',
|
||||
ALLOCATED: '已分配', OUTBOUNDED: '已出库', PARTIALLY_RECEIVED: '部分收货', RECEIVED: '已收货',
|
||||
|
||||
}
|
||||
return labels[value] || value || '—'
|
||||
}
|
||||
function deliveryMethodLabel(value: string) {
|
||||
const labels: Record<string, string> = { TRUCK: '卡车派送', EXPRESS: '快递派送' }
|
||||
return labels[value] || value || '—'
|
||||
}
|
||||
function formatDateTime(value: string) {
|
||||
return value ? value.replace('T', ' ').slice(0, 19) : '—'
|
||||
}
|
||||
async function load() {
|
||||
loading.value = true
|
||||
try {
|
||||
@@ -409,7 +418,7 @@ function selectRelabelInventory(inboundOrderId: string) {
|
||||
<div class="warehouse-filter-actions"><el-button type="primary" @click="query"><Search :size="16" />查询</el-button><el-button @click="resetFilters(); query()">重置</el-button></div>
|
||||
</div>
|
||||
<div v-loading="loading" class="warehouse-card warehouse-table-card">
|
||||
<div class="warehouse-table-scroll"><table><thead><tr><th v-for="column in config.columns" :key="column">{{ column }}</th></tr></thead><tbody><tr v-for="(row, rowIndex) in submittedRows" :key="rowIndex"><td><button class="warehouse-link" type="button" @click="openDetail(row)"><Eye :size="15" />查看</button></td><td v-for="(_, index) in config.columns.slice(1)" :key="index">{{ row[String(index)] }}</td></tr><tr v-if="submittedRows.length === 0"><td :colspan="config.columns.length"><div class="warehouse-empty">{{ config.emptyText }}</div></td></tr></tbody></table></div>
|
||||
<div class="warehouse-table-scroll"><table><thead><tr><th v-for="column in config.columns" :key="column">{{ column }}</th></tr></thead><tbody><tr v-for="(row, rowIndex) in submittedRows" :key="rowIndex"><td><button class="warehouse-link" type="button" @click="openDetail(row)"><Eye :size="15" />查看</button></td><td v-for="(_, index) in config.columns.slice(1)" :key="index"><SingleLineText :value="row[String(index)]" /></td></tr><tr v-if="submittedRows.length === 0"><td :colspan="config.columns.length"><div class="warehouse-empty">{{ config.emptyText }}</div></td></tr></tbody></table></div>
|
||||
<div class="warehouse-pagination"><span>共 <strong>{{ submittedRows.length }}</strong> 条</span><el-button size="small" disabled>上一页</el-button><button type="button" class="warehouse-page-number">1</button><el-button size="small" disabled>下一页</el-button></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user