订单列表优化
This commit is contained in:
@@ -86,12 +86,15 @@ const progress = ref({
|
||||
const filterText = computed(() => {
|
||||
const q = query.value || {}
|
||||
const codes = Array.isArray(q.customerCodes) ? q.customerCodes.filter(Boolean) : []
|
||||
const keywords = Array.isArray(q.customerKeywords) ? q.customerKeywords.filter(Boolean) : []
|
||||
const identifiers = Array.isArray(q.orderIdentifiers) ? q.orderIdentifiers.filter(Boolean) : []
|
||||
const nos = []
|
||||
if (identifiers.length) nos.push('单号 ' + identifiers.join(', '))
|
||||
if (q.orderId) nos.push('订单号 ' + q.orderId)
|
||||
if (q.orgOrderId) nos.push('运单号 ' + q.orgOrderId)
|
||||
if (q.transferOrderId) nos.push('转单号 ' + q.transferOrderId)
|
||||
return {
|
||||
customers: codes.join(', ') || '-',
|
||||
customers: keywords.join(', ') || codes.join(', ') || '-',
|
||||
time: (q.beginTime || '-') + ' ~ ' + (q.endTime || '-'),
|
||||
nos: nos.join(' / ')
|
||||
}
|
||||
@@ -178,8 +181,9 @@ function onClosed() {
|
||||
function submit(skipConfirm) {
|
||||
const q = query.value || {}
|
||||
const codes = Array.isArray(q.customerCodes) ? q.customerCodes.filter(v => v != null && String(v).trim() !== '') : []
|
||||
if (!codes.length || !q.beginTime || !q.endTime) {
|
||||
proxy.$modal.msgError('请先选择客户和提货时间')
|
||||
const keywords = Array.isArray(q.customerKeywords) ? q.customerKeywords.filter(v => v != null && String(v).trim() !== '') : []
|
||||
if ((!codes.length && !keywords.length) || !q.beginTime || !q.endTime) {
|
||||
proxy.$modal.msgError('请先输入客户并选择提货时间')
|
||||
return
|
||||
}
|
||||
const start = () => {
|
||||
@@ -197,7 +201,9 @@ function submit(skipConfirm) {
|
||||
}
|
||||
emitProgress()
|
||||
return syncOrderSourceByFilter({
|
||||
customerCodes: codes,
|
||||
customerCodes: codes.length ? codes : undefined,
|
||||
customerKeywords: keywords.length ? keywords : undefined,
|
||||
orderIdentifiers: Array.isArray(q.orderIdentifiers) && q.orderIdentifiers.length ? q.orderIdentifiers : undefined,
|
||||
beginTime: q.beginTime,
|
||||
endTime: q.endTime,
|
||||
orderId: q.orderId || undefined,
|
||||
|
||||
Reference in New Issue
Block a user