From 72f50e732de8b346634408d7d78995c49e01bcef Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Tue, 15 Jul 2025 10:10:34 +0800
Subject: [PATCH] =?UTF-8?q?YT-2797=E9=A1=BA=E5=BC=95=E5=8F=91=E8=B4=A7?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=A2=9E=E5=8A=A0=E3=80=90=E7=BB=B4=E6=8A=A4?=
=?UTF-8?q?=E5=AF=B9=E8=B4=A6=E6=97=A5=E6=9C=9F=E3=80=91=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=85=A5=E7=BA=B3=E5=85=A5=E5=8F=97=E9=A2=86?=
=?UTF-8?q?=E4=B9=A6=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E5=B7=AE=E5=BC=82=E6=95=B0=E6=8D=AE=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ImportForm/src/ImportFormStep.vue | 44 +++------
.../deliverRecordMain.data.ts | 94 +++++++++++++++----
.../deliverRecordMain/index.vue | 24 ++---
3 files changed, 97 insertions(+), 65 deletions(-)
diff --git a/src/components/ImportForm/src/ImportFormStep.vue b/src/components/ImportForm/src/ImportFormStep.vue
index f75c9d158..aaba316bb 100644
--- a/src/components/ImportForm/src/ImportFormStep.vue
+++ b/src/components/ImportForm/src/ImportFormStep.vue
@@ -116,6 +116,7 @@ import { waitForDebugger } from 'node:inspector/promises'
import { it } from 'node:test'
import { emit } from 'process'
import * as XLSX from 'xlsx';
+import * as MaintenanceBillDateApi from '@/api/wms/maintenanceBillDate'
defineOptions({ name: 'ImportForm' })
@@ -320,8 +321,7 @@ const submitForm = async () => {
error.value = false
isShowLoading.value = false
}else{
- if (props.confirmFormSuccess) {
- console.log(888,formRef.value.formModel)
+ // if (props.confirmFormSuccess) {
const pars= props.tableObject.tableList.map(obj => {
return {
id: obj.id || null ,
@@ -339,23 +339,15 @@ const submitForm = async () => {
notIncludedList: [],
}
})
- await props.confirmFormSuccess(pars,
- (msg)=>{
- if(msg){
- message.error(msg)
- error.value = false
- isShowLoading.value = false
- return
- }else{
- message.success("导入成功!")
- error.value = false
- active.value = 2 // 设置为第三步
- isShowLoading.value = false
- return
- }
- }
- )
- }
+ try {
+ isShowLoading.value = true
+ await MaintenanceBillDateApi.inducedProductBatchUpdate(pars)
+ isShowLoading.value = false
+ active.value = 2
+ } catch (e) {
+ isShowLoading.value = false
+ }
+ return
}
}
if(active.value === 2){
@@ -578,7 +570,6 @@ const opensearchTable = (
}
const submitFormSuccess = (response: any) => {
formLoading.value = true
- console.log(response)
if (response) {
if (response.code == 500) {
uploadRef.value!.clearFiles()
@@ -608,16 +599,12 @@ const submitFormSuccess = (response: any) => {
} else {
message.success('上传成功')
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 = 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;
@@ -634,10 +621,6 @@ const submitFormSuccess = (response: any) => {
// 动态表格列
const currentColumns = computed(() => {
- console.log('当前 active:', active.value);
- console.log('tableList:', props.tableObject?.tableList);
- console.log('errorTableColumns:', props.errorTableColumns);
- console.log('successTableColumns:', props.successTableColumns);
// 只在第二步(active === 1)时显示表格
if (active.value !== 1) {
@@ -656,16 +639,13 @@ const currentColumns = computed(() => {
columns = Array.isArray(props.errorTableColumns?.allSchemas?.tableColumns)
? props.errorTableColumns?.allSchemas?.tableColumns
: [];
- console.log('使用错误数据列');
} else {
// 如果没有失败数据,使用成功数据列
columns = Array.isArray(props.successTableColumns?.allSchemas?.tableColumns)
? props.successTableColumns?.allSchemas?.tableColumns
: [];
- console.log('使用成功数据列');
}
- console.log('最终使用的列:', columns);
return columns;
});
@@ -690,7 +670,6 @@ const handleExceed = (): void => {
// 监控表格数据变化
watch(() => props.tableObject?.tableList, (newVal) => {
- console.log('tableList 发生变化:', newVal);
}, { deep: true });
// 监控列定义变化
@@ -748,7 +727,6 @@ const downloadDifferenceData = () => {
quantity:item.incorporationQuantity,
};
});
- console.log(11, list)
emits("open-difference-data",formRef.value.formModel,list)
}
diff --git a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts
index 465251497..3af8ad8ed 100644
--- a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts
+++ b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts
@@ -1371,6 +1371,63 @@ export const ImportLeadershipDocErrorData = useCrudSchemas(reactive([
+ {
+ label: '纳入申领书背番',
+ field: 'backNumberListShow',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ multiple: true,
+ isInpuFocusShow: false, // 开启查询弹窗
+ searchListPlaceholder: '请选择背番',
+ searchField: 'backNumber',
+ searchTitle: '物料基础信息',
+ searchAllSchemas: Itembasic.allSchemas,
+ searchPage: ItemBasicApi.selectItembasicPageToFgAndSemibasicPage,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }],
+ verificationPage: ItemBasicApi.getItemListByCodes, // 校验数去焦点输入是否正确的方法
+ isShowTableFormSearch: true,
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ componentProps: {
+ multiple: true,
+ enterSearch: true,
+ isSearchList: true,
+ searchListPlaceholder: '请选择背番',
+ searchField: 'backNumber',
+ searchTitle: '物料基础信息',
+ searchAllSchemas: Itembasic.allSchemas,
+ searchPage: ItemBasicApi.getBackNumberPage,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'backNumber',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
{
label: '背番',
field: 'backNumber',
@@ -1381,7 +1438,7 @@ export const MaintenanceBillDateMain = useCrudSchemas(reactive([
tableForm:{
multiple:true,
isInpuFocusShow: false, // 开启查询弹窗
- searchListPlaceholder: '请选择品番',
+ searchListPlaceholder: '请选择背番',
searchField: 'backNumber',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
@@ -1406,7 +1463,7 @@ export const MaintenanceBillDateMain = useCrudSchemas(reactive([
componentProps: {
enterSearch: true,
isSearchList: true,
- searchListPlaceholder: '请选择品番',
+ searchListPlaceholder: '请选择背番',
searchField: 'backNumber',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
@@ -1416,14 +1473,14 @@ export const MaintenanceBillDateMain = useCrudSchemas(reactive([
value: 'TRUE',
isMainValue: false
}],
- // verificationParams: [{
- // key: 'code',
- // action: '==',
- // value: '',
- // isMainValue: false,
- // isSearch: true,
- // isFormModel: true,
- // }], // 失去焦点校验参数
+ verificationParams: [{
+ key: 'backNumber',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
}
}
},
@@ -1468,9 +1525,10 @@ export const MaintenanceBillDateMain = useCrudSchemas(reactive([
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
+ defaultTime: new Date('1 00:00:00')
}
},
},
@@ -1482,9 +1540,10 @@ export const MaintenanceBillDateMain = useCrudSchemas(reactive([
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
+ defaultTime: new Date('1 23:59:59')
}
},
},
@@ -1548,6 +1607,9 @@ export const MaintenanceBillDateMain = useCrudSchemas(reactive([
// 维护对账日期主校验
export const MaintenanceBillDateMainRules = reactive({
+ backNumberListShow: [
+ { required: true, message: '请输入纳入申领书背番', trigger: 'blur' },
+ ],
backNumber: [
{ required: true, message: '请输入背番', trigger: 'blur' },
],
@@ -1569,7 +1631,7 @@ export const MaintenanceBillDateMainRules = reactive({
{ type: 'number', message: '结束序号必须为数字', trigger: 'blur' }
],
reconciliationDate: [
- { required: true, message: '请选择顺引结束日期', trigger: 'change' },
+ { required: true, message: '请选择对账日期', trigger: 'change' },
],
})
/**
@@ -1582,7 +1644,7 @@ export const MaintenanceBillDateDetail = useCrudSchemas(reactive([
sort: 'custom',
tableForm: {
type: 'FormDate',
- placeholder: '请选择维护对账日期',
+ placeholder: '请选择不包含顺引日期',
valueFormat: 'YYYYMMDD',
}
},
diff --git a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
index de979f060..7e2de3154 100644
--- a/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
+++ b/src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
@@ -197,7 +197,6 @@ const businessType = ref()
const importFileName = ref()
const tableData = ref([])
const formRef = ref()
-console.log(99 , routeName.value)
const tableColumns = ref([...DeliverRecordMain.allSchemas.tableColumns, ...DeliverRecordDetail.allSchemas.tableMainColumns])
const mainAndDetaillSchemas = ref(cloneDeep(DeliverRecordMain.allSchemas))
mainAndDetaillSchemas.value.tableColumns = [...DeliverRecordMain.allSchemas.tableColumns,...DeliverRecordDetail.allSchemas.tableMainColumns]
@@ -341,7 +340,6 @@ const submitForm = async (formType, submitData) => {
if(rs.length > 1) isExist = true
})
data.businessType = businessType.value
- console.log(data);
if (isExist) {
return message.warning('品番重复')
}
@@ -458,7 +456,6 @@ const handlePoint = async (row) => {
// 筛选提交
const searchFormClick = (searchData) => {
tableObject.params.isSearch = true
- console.log('searchData',searchData.filters);
if(!searchData.filters){//重置的时候应用
searchData.filters = []
}
@@ -491,7 +488,6 @@ const searchFormClick = (searchData) => {
const confirmFormSuccess = (dataList,callback) => {
MaintenanceBillDateApi.inducedProductBatchUpdate(dataList).then(res => {
- console.log(res)
if (res && res.code == 200) {
getList()
}
@@ -520,7 +516,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
}
const searchTableAddSuccess = (formField, searchField, val, formRef, type, row) => {
- console.log(type)
if (type == 'tableForm') {
if(formField == 'itemCode') {
const tableFormKeys = {}
@@ -685,13 +680,12 @@ const sendGoodsNum = async () => {
data.notIncludedList = tableDataBillDate.value&&tableDataBillDate.value.length>0 ? tableDataBillDate.value : []
data.customerOrderNumber=''
data.customerCode=''
- data.incorporationNumber=''
- console.log(data)
+ data.incorporationNumber = ''
+ data.backNumberList = data.backNumberListShow.split(',')
try {
maintenanceBillDateRef.value.formLoading = true
const res = await MaintenanceBillDateApi.comPuteReconciliationDate(data)
maintenanceBillDateRef.value.formLoading = false
- console.log(res)
allNumber.value = res.zs
} finally {
maintenanceBillDateRef.value.formLoading = false
@@ -726,7 +720,6 @@ const updateBillDate = async () => {
data.customerOrderNumber=''
data.customerCode=''
data.incorporationNumber = ''
- console.log(data)
if (!allNumber.value) {
message.warning('请先计算发货数量!')
return
@@ -747,9 +740,13 @@ const updateBillDate = async () => {
}
const searchTableAddSuccessBillDate = (formField, searchField, val, formRef, type, row) => {
- const setV = {}
+ const setV = {}
+ if (formField == 'backNumberListShow') {
+ setV['backNumberListShow'] = val.map(item => item[searchField]).join(',')
+ } else {
setV[formField] = val[0][searchField]
- formRef.setValues(setV)
+ }
+ formRef.setValues(setV)
}
const footButtonClickAdjustDiffData = async (val) => {
if (val == 'nextStep') {
@@ -761,7 +758,6 @@ const footButtonClickAdjustDiffData = async (val) => {
const fileDataList = ref()
// 调整差异数据弹窗
const openDifferenceData = (formModel,list) => {
- console.log(333,formModel)
adjustDiffDataRef.value.open('create')
nextTick(() => {
adjustDiffDataRef.value.formRef.setValues(formModel)
@@ -819,7 +815,6 @@ const handleAdjustDifferenceData = async () => {
tableDatAadjustDiffData.value.tableList = []
tableDatAadjustDiffData.value.total=0
const res = await MaintenanceBillDateApi.getAdjustmentReconDateList(paramsData.value)
- console.log(22,res)
tableDatAadjustDiffData.value.tableList = res.failList
tableDatAadjustDiffData.value.total = res.failList.length
isOk.value = true
@@ -828,13 +823,11 @@ const handleAdjustDifferenceData = async () => {
isOk.value = false
isShowFormLoading.value = false
} finally {
- console.log(999,isOk.value)
}
}
// 调整差异数量下一步
const adjustDifferenceDataNextStep = async () => {
- console.log(8899,isOk.value)
if(!isOk.value) {
message.warning('请先调整差异数量')
return
@@ -861,7 +854,6 @@ const adjustDifferenceDataNextStep = async () => {
notIncludedList: paramsData.value.notIncludedList,
}
})
- console.log(111,pars)
try {
isShowFormLoading.value = true
await MaintenanceBillDateApi.inducedProductBatchUpdate(pars)