|
@ -48,9 +48,12 @@ |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="active == 1" class="step-two-container"> |
|
|
<div v-if="active == 1" class="step-two-container"> |
|
|
<div class="warning-message"> |
|
|
<div class="warning-message" v-if="active == 1 && error"> |
|
|
<el-icon color="#E44033" size="18" style="margin-right: 6px;"><WarningFilled /></el-icon> |
|
|
<el-icon color="#E44033" size="18" style="margin-right: 6px;"><WarningFilled /></el-icon> |
|
|
纳入受领书数量与顺引发货记录数量不一致,无法导入。以下是差异数据。 |
|
|
纳入受领书数量与顺引发货记录数量不一致,无法导入。以下是差异数据。 |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="warning-message" v-if="active == 1 && !error"> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div class="table-container"> |
|
|
<div class="table-container"> |
|
|
<Table v-clientTable |
|
|
<Table v-clientTable |
|
@ -192,10 +195,12 @@ const formSchema = ref(props.formSchema) |
|
|
const rules = ref(props.rules) |
|
|
const rules = ref(props.rules) |
|
|
const importUrl = ref('') |
|
|
const importUrl = ref('') |
|
|
const active = ref(props.active) |
|
|
const active = ref(props.active) |
|
|
|
|
|
const error = ref(false) |
|
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
const open = () => { |
|
|
const open = () => { |
|
|
dialogVisible.value = true |
|
|
dialogVisible.value = true |
|
|
|
|
|
error.value = false |
|
|
resetForm() |
|
|
resetForm() |
|
|
active.value = 0 // 重置步骤 |
|
|
active.value = 0 // 重置步骤 |
|
|
// 重置表格数据 |
|
|
// 重置表格数据 |
|
@ -215,13 +220,15 @@ const submitForm = async () => { |
|
|
// 如果当前在确认数据步骤,调用确认函数 |
|
|
// 如果当前在确认数据步骤,调用确认函数 |
|
|
if (active.value === 1) { |
|
|
if (active.value === 1) { |
|
|
if (props.confirmFormSuccess) { |
|
|
if (props.confirmFormSuccess) { |
|
|
const result = await props.confirmFormSuccess(props.tableObject.tableList, |
|
|
await props.confirmFormSuccess(props.tableObject.tableList, |
|
|
(msg)=>{ |
|
|
(msg)=>{ |
|
|
if(msg){ |
|
|
if(msg){ |
|
|
message.error(msg) |
|
|
message.error(msg) |
|
|
|
|
|
error.value = false |
|
|
return |
|
|
return |
|
|
}else{ |
|
|
}else{ |
|
|
message.success(msg) |
|
|
message.success(msg) |
|
|
|
|
|
error.value = false |
|
|
active.value = 2 // 设置为第三步 |
|
|
active.value = 2 // 设置为第三步 |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
@ -231,6 +238,7 @@ const submitForm = async () => { |
|
|
} |
|
|
} |
|
|
if(active.value === 2){ |
|
|
if(active.value === 2){ |
|
|
dialogVisible.value = false |
|
|
dialogVisible.value = false |
|
|
|
|
|
error.value = false |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -319,18 +327,21 @@ const submitFormSuccess = (response: any) => { |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
message.success('导入成功') |
|
|
message.success('上传成功') |
|
|
|
|
|
debugger |
|
|
if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) { |
|
|
if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) { |
|
|
console.log('设置差异数据:', response.data.successData.failList); |
|
|
console.log('设置差异数据:', response.data.successData.failList); |
|
|
console.log('使用的列定义:', props.errorTableColumns); |
|
|
console.log('使用的列定义:', props.errorTableColumns); |
|
|
props.tableObject.tableList = response.data.successData.failList; |
|
|
props.tableObject.tableList = response.data.successData.failList; |
|
|
props.tableObject.total = response.data.successData.failList.length; |
|
|
props.tableObject.total = response.data.successData.failList.length; |
|
|
|
|
|
error.value = true; |
|
|
active.value = 1; |
|
|
active.value = 1; |
|
|
} else { |
|
|
} else { |
|
|
console.log('设置成功数据:', response.data.successData.successList); |
|
|
console.log('设置成功数据:', response.data.successData.successList); |
|
|
console.log('使用的列定义:', props.successTableColumns); |
|
|
console.log('使用的列定义:', props.successTableColumns); |
|
|
props.tableObject.tableList = response.data.successData.successList; |
|
|
props.tableObject.tableList = response.data.successData.successList; |
|
|
props.tableObject.total = response.data.successData.successList.length; |
|
|
props.tableObject.total = response.data.successData.successList.length; |
|
|
|
|
|
error.value = false; |
|
|
active.value = 1; |
|
|
active.value = 1; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|