diff --git a/ruoyi-ui-vue3/src/components/BusinessAssistant/AssistantQuotePreview.vue b/ruoyi-ui-vue3/src/components/BusinessAssistant/AssistantQuotePreview.vue index 13b79c9..69b906b 100644 --- a/ruoyi-ui-vue3/src/components/BusinessAssistant/AssistantQuotePreview.vue +++ b/ruoyi-ui-vue3/src/components/BusinessAssistant/AssistantQuotePreview.vue @@ -10,9 +10,9 @@ - + - + @@ -30,6 +30,8 @@ const page = ref(1), pageRows = computed(() => props.rows.slice((page.value - 1) const correction = computed(() => props.rows.some(row => Object.hasOwn(row, 'newAmount'))) const canSkip = computed(() => correction.value && props.rows.some(row => row._canSkip)) const reviewState = assistantQuotationReviewState +function newPrice(row) { const state = reviewState(row); return correction.value ? state.skipped ? '本次跳过' : state.pending ? '待重新校验' : row.unitPrice : row.skipped ? '留空不变' : row.unitPrice } +function newAmount(row) { const state = reviewState(row); return state.skipped ? '不修改' : state.pending ? '待重新校验' : row.newAmount } function toggleSkip(row) { if (props.busy) return; const change = assistantQuotationSkipChange(row); if (change) emit('skip', change) } watch(() => props.rows, () => { page.value = 1 }) diff --git a/ruoyi-ui-vue3/tests/runtime/assistant-quotation-review.spec.js b/ruoyi-ui-vue3/tests/runtime/assistant-quotation-review.spec.js index 075fc2a..fee56b4 100644 --- a/ruoyi-ui-vue3/tests/runtime/assistant-quotation-review.spec.js +++ b/ruoyi-ui-vue3/tests/runtime/assistant-quotation-review.spec.js @@ -46,6 +46,10 @@ describe('unmatched PDF quotations have a visible escape without deleting source expect(wrapper.find('button[aria-label="第24项恢复处理"]').element.disabled).toBe(true) await wrapper.find('button[aria-label="第24项恢复处理"]').trigger('click') expect(wrapper.emitted('skip')).toBeUndefined() + await wrapper.setProps({ busy: false, rows: [{ ...missing()._quotePreview[0], _draftRowId: 'pdf-line-24', _canSkip: true, _skipSelected: false, skipped: true }] }) + expect(wrapper.text()).toContain('已恢复处理,请重新校验预览') + expect(wrapper.text()).not.toContain('本次跳过,不修改采购') + expect(wrapper.findAll('.assistant-quote-new').length).toBe(0) } finally { wrapper.unmount() } }) it('purchase import drafts expose removal and restoration without editing or deleting business records', async () => { diff --git a/ruoyi-ui-vue3/tests/ui/assistant-draft-review.html b/ruoyi-ui-vue3/tests/ui/assistant-draft-review.html index 205d368..1da2fa2 100644 --- a/ruoyi-ui-vue3/tests/ui/assistant-draft-review.html +++ b/ruoyi-ui-vue3/tests/ui/assistant-draft-review.html @@ -9,7 +9,7 @@ import {assistantApplyDraftChanges} from '../../src/utils/assistant-draft-edit.j import {assistantExcludeDraftRows,assistantRestoreDraftRow} from '../../src/utils/assistant-draft-exclusions.js' createApp({components:{Draft},setup(){ const mode=ref('quote'),rows=ref([]),excluded=ref([]),draft=ref({}),message=ref(''),action={allowed:true,query:false} - const quoteFields=[{key:'id',ref:'purchase',label:'采购明细'},{key:'finalUnitPrice',type:'decimal',label:'新报价'},{key:'skipCorrection',type:'boolean',label:'本项暂不更正'}] + const quoteFields=[{key:'id',ref:'purchase',label:'采购明细',readonly:true},{key:'finalUnitPrice',type:'decimal',label:'新报价'},{key:'skipCorrection',type:'boolean',label:'本项暂不更正'}] const purchaseFields=[{key:'materialName',label:'物品名称'},{key:'quantity',label:'数量',type:'decimal'}] function reset(value){mode.value=value;excluded.value=[];message.value=''; rows.value=value==='quote'?[{_rowId:'quote-1',id:7,finalUnitPrice:88,_quotePreview:[{line:1,name:'模拟水泵',quantity:2,previousPrice:60,unitPrice:88,newAmount:176,notice:'模拟匹配成功'}]},