|
|
@ -47,23 +47,24 @@ |
|
|
|
</template> |
|
|
|
</el-upload> |
|
|
|
</div> |
|
|
|
<div v-if="active == 1"> |
|
|
|
<div class="red"> |
|
|
|
<div v-if="active == 1" class="step-two-container"> |
|
|
|
<div class="warning-message"> |
|
|
|
<el-icon color="#E44033" size="18" style="margin-right: 6px;"><WarningFilled /></el-icon> |
|
|
|
纳入受领书数量与顺引发货记录数量不一致,无法导入。以下是差异数据。 |
|
|
|
</div> |
|
|
|
|
|
|
|
<Table v-clientTable |
|
|
|
:columns="Array.isArray(currentColumns) ? currentColumns : []" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
|
:pagination="{ |
|
|
|
total: tableObject.total |
|
|
|
}" |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
/> |
|
|
|
<div class="table-container"> |
|
|
|
<Table v-clientTable |
|
|
|
:columns="Array.isArray(currentColumns) ? currentColumns : []" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
|
:pagination="{ |
|
|
|
total: tableObject.total |
|
|
|
}" |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="active == 2" class="success"> |
|
|
|
<el-icon color="#409eff" size="60"><CircleCheckFilled /></el-icon> |
|
|
@ -175,6 +176,11 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
// 成功入库接口 |
|
|
|
confirmFormSuccess: { |
|
|
|
type: Function, |
|
|
|
required: false, |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
// 确保 tableObject 是响应式的 |
|
|
@ -206,10 +212,26 @@ const formRef = ref() |
|
|
|
|
|
|
|
/** 提交表单 */ |
|
|
|
const submitForm = async () => { |
|
|
|
// 如果当前在确认数据步骤,直接进入下一步 |
|
|
|
// 如果当前在确认数据步骤,调用确认函数 |
|
|
|
if (active.value === 1) { |
|
|
|
active.value = 2 |
|
|
|
return |
|
|
|
if (props.confirmFormSuccess) { |
|
|
|
const result = await props.confirmFormSuccess(props.tableObject.tableList, |
|
|
|
(msg)=>{ |
|
|
|
if(msg){ |
|
|
|
message.error(msg) |
|
|
|
return |
|
|
|
}else{ |
|
|
|
message.success(msg) |
|
|
|
active.value = 2 // 设置为第三步 |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
if(active.value === 2){ |
|
|
|
dialogVisible.value = false |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const elForm = unref(formRef)?.getElFormRef() |
|
|
@ -441,4 +463,37 @@ const importTemplate = () => { |
|
|
|
align-items: center; |
|
|
|
margin-top: 8px; |
|
|
|
} |
|
|
|
.step-two-container { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
height: 400px; // 根据实际需求调整 |
|
|
|
|
|
|
|
.warning-message { |
|
|
|
margin-bottom: 10px; |
|
|
|
color: #E44033; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.table-container { |
|
|
|
flex: 1; |
|
|
|
overflow: hidden; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
:deep(.el-table) { |
|
|
|
flex: 1; |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
.el-table__body-wrapper { |
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.el-pagination) { |
|
|
|
margin-top: 10px; |
|
|
|
padding: 5px 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |