|
|
@ -7,7 +7,7 @@ |
|
|
|
<el-step title="确认数据" :icon="List"/> |
|
|
|
<el-step title="导入成功" :icon="CircleCheckFilled"/> |
|
|
|
</el-steps> |
|
|
|
<div v-if="active == 0"> |
|
|
|
<div v-show="active == 0"> |
|
|
|
<Form |
|
|
|
ref="formRef" |
|
|
|
:rules="rules" |
|
|
@ -48,7 +48,7 @@ |
|
|
|
</template> |
|
|
|
</el-upload> |
|
|
|
</div> |
|
|
|
<div v-if="active == 1" class="step-two-container"> |
|
|
|
<div v-show="active == 1" class="step-two-container"> |
|
|
|
<div class="warning-message" v-if="active == 1 && error"> |
|
|
|
<el-icon color="#E44033" size="18" style="margin-right: 6px;"><WarningFilled /></el-icon> |
|
|
|
纳入受领书数量与顺引发货记录数量不一致,无法导入。以下是差异数据。 |
|
|
@ -70,7 +70,7 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="active == 2" class="success"> |
|
|
|
<div v-show="active == 2" class="success"> |
|
|
|
<el-icon color="#409eff" size="60"><CircleCheckFilled /></el-icon> |
|
|
|
<div class="success-title">导入成功</div> |
|
|
|
<div class="success-text">订单号已关联到对应的顺引发货记录中</div> |
|
|
@ -113,6 +113,7 @@ import download from '@/utils/download' |
|
|
|
import { getBaseUrl } from '@/utils/systemParam' |
|
|
|
import { UploadFilled, List, CircleCheckFilled,WarningFilled } from '@element-plus/icons-vue' |
|
|
|
import { waitForDebugger } from 'node:inspector/promises' |
|
|
|
import { it } from 'node:test' |
|
|
|
import { emit } from 'process' |
|
|
|
import * as XLSX from 'xlsx'; |
|
|
|
|
|
|
@ -586,16 +587,17 @@ const submitFormSuccess = (response: any) => { |
|
|
|
console.log('使用的列定义:', props.errorTableColumns); |
|
|
|
props.tableObject.tableList = response.data.successData.failList; |
|
|
|
props.tableObject.total = response.data.successData.failList.length; |
|
|
|
error.value = true; |
|
|
|
active.value = 1; |
|
|
|
} else { |
|
|
|
console.log('设置成功数据:', response.data.successData.successList); |
|
|
|
console.log('使用的列定义:', props.successTableColumns); |
|
|
|
props.tableObject.tableList = response.data.successData.successList; |
|
|
|
props.tableObject.total = response.data.successData.successList.length; |
|
|
|
error.value = false; |
|
|
|
error.value = response.data.successData.failList.some(item=>item.difference!=0); |
|
|
|
active.value = 1; |
|
|
|
} |
|
|
|
// else { |
|
|
|
// console.log('设置成功数据:', response.data.successData.successList); |
|
|
|
// console.log('使用的列定义:', props.successTableColumns); |
|
|
|
// props.tableObject.tableList = response.data.successData.successList; |
|
|
|
// props.tableObject.total = response.data.successData.successList.length; |
|
|
|
// error.value = false; |
|
|
|
// active.value = 1; |
|
|
|
// } |
|
|
|
} |
|
|
|
} else if(response.data == null) { |
|
|
|
message.error(response.msg) |
|
|
@ -714,7 +716,16 @@ const downloadDifferenceData = () => { |
|
|
|
// XLSX.utils.book_append_sheet(wb, ws, "差异数据"); |
|
|
|
// const timestamp = new Date().getTime(); |
|
|
|
// XLSX.writeFile(wb, `差异数据_${timestamp}.xlsx`); |
|
|
|
emit("open-difference-data") |
|
|
|
const list = props.tableObject.tableList.map(item => { |
|
|
|
return { |
|
|
|
materialCode: item.materialCode, |
|
|
|
backNumber: item.backNumber, |
|
|
|
quantity:item.incorporationQuantity, |
|
|
|
}; |
|
|
|
}); |
|
|
|
console.log(11, list) |
|
|
|
|
|
|
|
emits("open-difference-data",formRef.value.formModel,list) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|