优化
This commit is contained in:
@@ -5,6 +5,12 @@ import { describe, expect, it } from 'vitest'
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/workflows/components/SmartLoadingWorkbench.vue'), 'utf8')
|
||||
|
||||
describe('SmartLoadingWorkbench business actions', () => {
|
||||
it('allows preload push before the real container number is available', () => {
|
||||
expect(source).toContain(':disabled="!canPush || !editable || !plan.items.length || Boolean(action)"')
|
||||
expect(source).not.toContain('!container?.containerNo')
|
||||
expect(source).toContain('真实集装箱号可在订舱放舱后补录')
|
||||
})
|
||||
|
||||
it('uses semantic outlined buttons and keeps narrow action cells usable', () => {
|
||||
expect(source).toContain('size="small" plain type="primary"')
|
||||
expect(source).toContain('size="small" plain type="danger"')
|
||||
|
||||
@@ -280,7 +280,7 @@ onMounted(() => { void load() })
|
||||
<el-button circle :loading="loading" aria-label="刷新智能排柜" @click="load"><RefreshCw :size="16" /></el-button>
|
||||
<el-button v-if="!plan" type="primary" :disabled="!canCreate || loading" :loading="action === 'create'" @click="createPlan"><Plus :size="15" />创建装柜草稿</el-button>
|
||||
<el-button v-if="plan" :disabled="!canAssign || !editable || Boolean(action)" :loading="action === 'recommend'" @click="recommend"><Sparkles :size="15" />生成智能建议</el-button>
|
||||
<el-button v-if="plan" type="primary" :disabled="!canPush || !editable || !plan.items.length || !container?.containerNo || Boolean(action)" @click="pushOpen = true"><Check :size="15" />推送预装</el-button>
|
||||
<el-button v-if="plan" type="primary" :disabled="!canPush || !editable || !plan.items.length || Boolean(action)" @click="pushOpen = true"><Check :size="15" />推送预装</el-button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -353,7 +353,7 @@ onMounted(() => { void load() })
|
||||
</AppDialog>
|
||||
|
||||
<AppDialog v-model="pushOpen" title="推送预装清单" confirm-type="primary" confirm-text="确认推送" :confirm-loading="action === 'push'" @confirm="confirmPush">
|
||||
<p>推送后装柜计划将进入装柜中,当前草稿明细不可再增删调整。请确认柜号和货物分配无误。</p>
|
||||
<p>推送后当前草稿明细不可再增删调整。真实集装箱号可在订舱放舱后补录,现场 PDA 任务将在条件齐备后开放。</p>
|
||||
<ApiErrorMeta v-if="actionError" :details="actionError" />
|
||||
</AppDialog>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user