fix(admin): lock submitted measurement rule editing
This commit is contained in:
@@ -346,7 +346,8 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(source).toContain('仓库修改外箱(宽)')
|
||||
expect(source).toContain('仓库修改外箱(高)')
|
||||
expect(source).toContain('saveWarehouseOuterDimensions')
|
||||
expect(source).toContain("'MEASURE_REJECTED', 'WAIT_SPLIT'")
|
||||
expect(source).toContain("'PREPARING', 'WAIT_MEASURE', 'MEASURING', 'MEASURE_REJECTED'")
|
||||
expect(source).toContain('v-if="measurementDraftEditable"')
|
||||
expect(source).not.toContain('请至少输入一项需要修改的外箱尺寸')
|
||||
expect(source).toContain(".map((value) => value == null || value === '' ? null : Number(value))")
|
||||
expect(source).toContain('相关数值已重新计算')
|
||||
@@ -381,7 +382,7 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(source).toContain('label="箱规系数" value="MULTIPLY"')
|
||||
})
|
||||
|
||||
it('keeps preview modes independent and persists both outer-carton selectors immediately', () => {
|
||||
it('keeps preview modes independent and only persists outer-carton selectors while the measurement draft is editable', () => {
|
||||
expect(source).toContain("measurementSectionModes = reactive<Record<MeasurementSection, MeasurementCalculationMode>>")
|
||||
expect(source).toContain(':model-value="measurementSectionModes.customer"')
|
||||
expect(source).toContain(':model-value="measurementSectionModes.outer"')
|
||||
@@ -391,7 +392,10 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(source).not.toContain("updateMeasurementSectionMode('outer', $event)")
|
||||
expect(source.match(/@change="selectAndSaveOuterMeasurementMode\(\$event\)"/g)).toHaveLength(2)
|
||||
expect(source).not.toContain('@visible-change="handleOuterModeDropdownVisibleChange($event)"')
|
||||
expect(source.match(/:disabled="Boolean\(measurementStrategySavingId\) \|\| !can\('platform:firstleg:inbound:measure:edit'\)"/g)).toHaveLength(2)
|
||||
expect(source.match(/:disabled="Boolean\(measurementStrategySavingId\) \|\| !measurementDraftEditable"/g)).toHaveLength(2)
|
||||
expect(source).toContain("measurementDetail.value?.processStatus === 'MEASURE_PENDING'")
|
||||
expect(source).toContain('测量已提交待审核;如需修改箱规计算规则,请先退回测量')
|
||||
expect(source).toContain('if (!measurementDraftEditable.value)')
|
||||
expect(source).toContain('const previousMode = measurementSectionModes.outer')
|
||||
expect(source).toContain('if (!saved) measurementSectionModes.outer = previousMode')
|
||||
expect(source).not.toContain('handleOuterModeDropdownVisibleChange')
|
||||
|
||||
Reference in New Issue
Block a user