优化落库功能

This commit is contained in:
wuweihua
2026-10-26 23:23:22 +08:00
parent 8fba64e2d6
commit 2bae431e74
9 changed files with 370 additions and 204 deletions
@@ -36,7 +36,7 @@
icon="Refresh"
v-hasPermi="['monitor:orderSource:sync']"
@click="openFilterSync()"
>同步计费</el-button>
>同步落库</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -128,7 +128,7 @@
:loading="syncingKey === rowKey(row)"
v-hasPermi="['monitor:orderSource:sync']"
@click="handleSyncOne(row)"
>同步计费</el-button>
>同步落库</el-button>
</template> -->
</basic-table>
@@ -273,10 +273,10 @@ const syncProgressDegree = computed(() => Math.round(((syncFloat.value?.percent
const syncProgressText = computed(() => (syncFloat.value?.percent || 0) + '%')
const syncFloatTitle = computed(() => {
const st = (syncFloat.value?.status || '').toUpperCase()
if (syncFloat.value?.loading) return '异步同步计费中'
if (st === 'SUCCESS') return '同步计费完成'
if (st === 'FAIL') return '同步计费失败'
return '异步同步计费'
if (syncFloat.value?.loading) return '异步同步落库中'
if (st === 'SUCCESS') return '同步落库完成'
if (st === 'FAIL') return '同步落库失败'
return '异步同步落库'
})
const syncFloatSummary = computed(() => {
const p = syncFloat.value || {}
@@ -466,7 +466,7 @@ function openFilterSync() {
const hasTime = !!q.beginTime && !!q.endTime
// 与查询同口径:有单号即可同步;无单号时必须客户+提货时间
if (!hasIdentifier && !(hasCustomer && hasTime)) {
ElMessage.warning('请输入单号,或选择客户和提货时间后再同步计费')
ElMessage.warning('请输入单号,或选择客户和提货时间后再同步落库')
return
}
if (identifierCount > MAX_ORDER_IDENTIFIERS) {
@@ -474,8 +474,8 @@ function openFilterSync() {
return
}
const tip = hasIdentifier && !(hasCustomer && hasTime)
? `将按 ${identifierCount} 个单号查询匹配订单并异步同步计费,确认继续?`
: '确认按当前筛选分页查询并异步同步计费?'
? `将按 ${identifierCount} 个单号查询匹配订单并异步覆盖上游字段(不计费),确认继续?`
: '确认按当前筛选分页查询并异步覆盖上游字段(不计费)?'
proxy.$modal.confirm(tip, '二次确认').then(() => {
syncDialogRef.value?.open(q, true)
}).catch(() => {})
@@ -509,7 +509,7 @@ function toSyncRow(row) {
function handleSyncOne(row) {
proxy.$modal.confirm('确认同步计费该订单?', '二次确认').then(() => {
proxy.$modal.confirm('确认同步落库该订单(仅覆盖上游字段,不计费)?', '二次确认').then(() => {
syncingKey.value = rowKey(row)
return syncOrderSourceSelected([toSyncRow(row)])
}).then(res => {
@@ -544,7 +544,7 @@ function handleCheckProducts() {
function handleBatchSync(selection) {
if (!selection || !selection.length) return
proxy.$modal.confirm('确认同步选中的 ' + selection.length + ' 条订单?', '二次确认').then(() => {
proxy.$modal.confirm('确认同步选中的 ' + selection.length + ' 条订单(仅覆盖上游字段,不计费)?', '二次确认').then(() => {
batchLoading.value = true
return syncOrderSourceSelected(selection.map(toSyncRow))
}).then(res => {