Browse Source

YT-872,YT-873:纳入受领书导入问题修复

intex
ljlong_2630 2 weeks ago
parent
commit
c2fe04440a
  1. 17
      src/components/ImportForm/src/ImportFormStep.vue
  2. 25
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts

17
src/components/ImportForm/src/ImportFormStep.vue

@ -48,9 +48,12 @@
</el-upload>
</div>
<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>
纳入受领书数量与顺引发货记录数量不一致无法导入以下是差异数据
</div>
<div class="warning-message" v-if="active == 1 && !error">
</div>
<div class="table-container">
<Table v-clientTable
@ -192,10 +195,12 @@ const formSchema = ref(props.formSchema)
const rules = ref(props.rules)
const importUrl = ref('')
const active = ref(props.active)
const error = ref(false)
/** 打开弹窗 */
const open = () => {
dialogVisible.value = true
error.value = false
resetForm()
active.value = 0 //
//
@ -215,13 +220,15 @@ const submitForm = async () => {
//
if (active.value === 1) {
if (props.confirmFormSuccess) {
const result = await props.confirmFormSuccess(props.tableObject.tableList,
await props.confirmFormSuccess(props.tableObject.tableList,
(msg)=>{
if(msg){
message.error(msg)
error.value = false
return
}else{
message.success(msg)
error.value = false
active.value = 2 //
return
}
@ -231,6 +238,7 @@ const submitForm = async () => {
}
if(active.value === 2){
dialogVisible.value = false
error.value = false
return;
}
@ -319,18 +327,21 @@ const submitFormSuccess = (response: any) => {
});
})
} else {
message.success('导入成功')
message.success('上传成功')
debugger
if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) {
console.log('设置差异数据:', response.data.successData.failList);
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;
active.value = 1;
}
}

25
src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts

@ -945,26 +945,25 @@ export const DeliverRecordImport = useCrudSchemas(reactive<CrudSchema[]>([
},
},
]))
// 导入表单校验
export const DeliverRecordImportRules = reactive({
incorporationNumber: [
{ required: true, message: '请输入纳入受领书单号', trigger: 'blur' }
],
orderNumber: [
customerOrderNumber: [
{ required: true, message: '请输入订单号', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择类型', trigger: 'change' }
startDate: [
{ required: true, message: '请选择开始日期', trigger: 'change' }
],
materialCode: [
{ required: true, message: '请输入物料代码', trigger: 'blur' }
endDate: [
{ required: true, message: '请选择结束日期', trigger: 'change' }
],
backNumber: [
{ required: true, message: '请输入背番', trigger: 'blur' }
startNo: [
{ required: true, message: '请输入开始序号', trigger: 'change' },
{ type: 'number', message: '开始序号必须为数字', trigger: 'blur' }
],
quantity: [
{ required: true, message: '请输入数量', trigger: 'change' },
{ type: 'number', message: '数量必须为数字', trigger: 'blur' }
endNo: [
{ required: true, message: '请输入结束序号', trigger: 'change' },
{ type: 'number', message: '结束序号必须为数字', trigger: 'blur' }
]
})

Loading…
Cancel
Save