|
@ -271,9 +271,6 @@ const planArriveTimeStr = ref() |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
console.log('type:', type) |
|
|
|
|
|
console.log('formField:', formField) |
|
|
|
|
|
console.log(formField, searchField, val, formRef, type, row) |
|
|
|
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
// row[formField] = val[0][searchField] |
|
|
// row[formField] = val[0][searchField] |
|
@ -333,7 +330,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
} |
|
|
} |
|
|
//供应商代码 回车搜索 |
|
|
//供应商代码 回车搜索 |
|
|
const onEnter = async (field, value) => { |
|
|
const onEnter = async (field, value) => { |
|
|
console.log(field, value) |
|
|
|
|
|
formRef.value.opensearchTable( |
|
|
formRef.value.opensearchTable( |
|
|
'supplierCode', |
|
|
'supplierCode', |
|
|
'code', |
|
|
'code', |
|
@ -402,8 +398,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
console.log('formField:', formField) |
|
|
|
|
|
console.log('val:', val) |
|
|
|
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
@ -656,7 +650,6 @@ const buttonTableClick = async (val, row) => { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} else if (val == 'ressbq') { |
|
|
} else if (val == 'ressbq') { |
|
|
console.log('重新生成标签') |
|
|
|
|
|
// ElMessageBox.confirm(`<div style="color:red"> |
|
|
// ElMessageBox.confirm(`<div style="color:red"> |
|
|
// 重新生成标签后必须撕毁原标签,打印并粘贴新标签,如标签错误将拒绝收货!! |
|
|
// 重新生成标签后必须撕毁原标签,打印并粘贴新标签,如标签错误将拒绝收货!! |
|
|
// </div>`,'提示',{ |
|
|
// </div>`,'提示',{ |
|
@ -696,7 +689,6 @@ const buttonTableClick = async (val, row) => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
console.info('操作取消') |
|
|
|
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'point') { |
|
|
} else if (val == 'point') { |
|
@ -722,6 +714,7 @@ const getGenerateLabelList = async (row) => { |
|
|
} |
|
|
} |
|
|
await SupplierdeliverRequestDetailApi.getGenerateLabelList(params1).then((res) => { |
|
|
await SupplierdeliverRequestDetailApi.getGenerateLabelList(params1).then((res) => { |
|
|
detatableData1.value = res |
|
|
detatableData1.value = res |
|
|
|
|
|
console.log(999,detatableData1.value) |
|
|
detatableData1.value.forEach((item) => { |
|
|
detatableData1.value.forEach((item) => { |
|
|
item.boxPackaging = item.boxPackaging ? item.boxPackaging : [] |
|
|
item.boxPackaging = item.boxPackaging ? item.boxPackaging : [] |
|
|
item.packUnitInitOptions = item.boxPackaging |
|
|
item.packUnitInitOptions = item.boxPackaging |
|
@ -730,6 +723,9 @@ const getGenerateLabelList = async (row) => { |
|
|
if (obj) { |
|
|
if (obj) { |
|
|
item.packUnit = obj.packUnit |
|
|
item.packUnit = obj.packUnit |
|
|
item.packQty = obj.packQty |
|
|
item.packQty = obj.packQty |
|
|
|
|
|
} else { |
|
|
|
|
|
item.packUnit = '' |
|
|
|
|
|
item.packQty = '' |
|
|
} |
|
|
} |
|
|
// 有托规格显示托规格,没有显示第一条规格 |
|
|
// 有托规格显示托规格,没有显示第一条规格 |
|
|
item.secondPackUnit = obj?.parentPackUnit |
|
|
item.secondPackUnit = obj?.parentPackUnit |
|
@ -938,16 +934,13 @@ const handleAddQualityReport = () => { |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
}) |
|
|
}) |
|
|
uploadQualityReportTableData.value.push(tableFormKeys) |
|
|
uploadQualityReportTableData.value.push(tableFormKeys) |
|
|
console.log('handleAddQualityReport') |
|
|
|
|
|
} |
|
|
} |
|
|
const handleDeleteQualityReport = (row, index) => { |
|
|
const handleDeleteQualityReport = (row, index) => { |
|
|
uploadQualityReportTableData.value.splice(index, 1) |
|
|
uploadQualityReportTableData.value.splice(index, 1) |
|
|
console.log('handleDeleteQualityReport', row) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 上传质量报告 */ |
|
|
/** 上传质量报告 */ |
|
|
const handleUploadQualityReport = async (row) => { |
|
|
const handleUploadQualityReport = async (row) => { |
|
|
console.log('SupplierdeliverInspectionDetail', SupplierdeliverInspectionDetail.allSchemas) |
|
|
|
|
|
const uploadFile = SupplierdeliverInspectionDetail.allSchemas.formSchema.find( |
|
|
const uploadFile = SupplierdeliverInspectionDetail.allSchemas.formSchema.find( |
|
|
(item) => item.field == 'uploadFile' |
|
|
(item) => item.field == 'uploadFile' |
|
|
) |
|
|
) |
|
@ -969,7 +962,6 @@ const handleUploadQualityReport = async (row) => { |
|
|
await SupplierdeliverInspectionDetailApi.getSupplierdeliverDetailInfo(row.masterId).then( |
|
|
await SupplierdeliverInspectionDetailApi.getSupplierdeliverDetailInfo(row.masterId).then( |
|
|
(res) => { |
|
|
(res) => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
// console.log("返回结果:",res) |
|
|
|
|
|
uploadQualityReportTableData.value = res |
|
|
uploadQualityReportTableData.value = res |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1059,17 +1051,14 @@ const genRecords = async (id: number) => { |
|
|
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) |
|
|
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
message.success(t('ts.处理成功!')) |
|
|
message.success(t('ts.处理成功!')) |
|
|
console.log('resresresresres', res) |
|
|
|
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
getList() |
|
|
getList() |
|
|
console.log('刷新列表') |
|
|
|
|
|
getLoading?.close() |
|
|
getLoading?.close() |
|
|
|
|
|
|
|
|
// 单据打印 |
|
|
// 单据打印 |
|
|
handleDocumentPrint(res) |
|
|
handleDocumentPrint(res) |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
console.log('发起处理', err) |
|
|
|
|
|
getLoading?.close() |
|
|
getLoading?.close() |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
@ -1094,23 +1083,19 @@ const genRecords = async (id: number) => { |
|
|
// SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) |
|
|
// SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) |
|
|
// .then((res) => { |
|
|
// .then((res) => { |
|
|
// message.success(t('ts.处理成功!')) |
|
|
// message.success(t('ts.处理成功!')) |
|
|
// console.log('resresresresres', res) |
|
|
|
|
|
// // 刷新列表 |
|
|
// // 刷新列表 |
|
|
// getList() |
|
|
// getList() |
|
|
// console.log('刷新列表') |
|
|
|
|
|
// getLoading?.close() |
|
|
// getLoading?.close() |
|
|
|
|
|
|
|
|
// // 单据打印 |
|
|
// // 单据打印 |
|
|
// handleDocumentPrint(res) |
|
|
// handleDocumentPrint(res) |
|
|
// }) |
|
|
// }) |
|
|
// .catch((err) => { |
|
|
// .catch((err) => { |
|
|
// console.log('发起处理', err) |
|
|
|
|
|
// getLoading?.close() |
|
|
// getLoading?.close() |
|
|
// }) |
|
|
// }) |
|
|
// } |
|
|
// } |
|
|
// }) |
|
|
// }) |
|
|
// .catch((err) => { |
|
|
// .catch((err) => { |
|
|
// console.log('自检报告校验异常', err) |
|
|
|
|
|
// getLoading?.close() |
|
|
// getLoading?.close() |
|
|
// }) |
|
|
// }) |
|
|
// } |
|
|
// } |
|
@ -1199,7 +1184,6 @@ const printAllClick = () => {} |
|
|
|
|
|
|
|
|
// 批量打印--供应商发货申请 |
|
|
// 批量打印--供应商发货申请 |
|
|
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => { |
|
|
console.log('批量打印', val) |
|
|
|
|
|
// let rows:any = [] |
|
|
// let rows:any = [] |
|
|
// val.forEach(item=>{ |
|
|
// val.forEach(item=>{ |
|
|
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)] |
|
|
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)] |
|
@ -1212,11 +1196,9 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r |
|
|
|
|
|
|
|
|
await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(',')) |
|
|
await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(',')) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
console.log(res) |
|
|
|
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
console.log(err) |
|
|
|
|
|
message.error(t('ts.创建标签失败')) |
|
|
message.error(t('ts.创建标签失败')) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -1259,7 +1241,6 @@ const submitForm = async (formType, submitData) => { |
|
|
} |
|
|
} |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
let isHave = data.subList.some((item) => { |
|
|
let isHave = data.subList.some((item) => { |
|
|
console.log('CCCCC', item.expireDate) |
|
|
|
|
|
if (item.expireDate != null) { |
|
|
if (item.expireDate != null) { |
|
|
item.produceDate > item.expireDate |
|
|
item.produceDate > item.expireDate |
|
|
} |
|
|
} |
|
@ -1277,12 +1258,10 @@ const submitForm = async (formType, submitData) => { |
|
|
await message |
|
|
await message |
|
|
.confirm(`${t('ts.计划到货时间大于')}${planArriveTimeStr.value}${t('ts.是否继续?')}`) |
|
|
.confirm(`${t('ts.计划到货时间大于')}${planArriveTimeStr.value}${t('ts.是否继续?')}`) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
console.log('选择了OK') |
|
|
|
|
|
//选择OK |
|
|
//选择OK |
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
//选择取消 |
|
|
//选择取消 |
|
|
console.log('选择了cancel') |
|
|
|
|
|
confirmFlag = true |
|
|
confirmFlag = true |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|
return |
|
|
return |
|
@ -1351,7 +1330,6 @@ const getDefaultSupplier = async () => { |
|
|
} else { |
|
|
} else { |
|
|
defaultSupplierCode.value = '' |
|
|
defaultSupplierCode.value = '' |
|
|
} |
|
|
} |
|
|
console.log('defaultSupplierCode', defaultSupplierCode) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|