|
|
@ -438,7 +438,7 @@ const butttondata = (row,$index) => { |
|
|
|
}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), // 删除 |
|
|
|
{ |
|
|
|
label: '生成标签', |
|
|
|
label: t('ts.生成标签'), |
|
|
|
name: 'ssbq', |
|
|
|
hide: isShowMainButtonLabel(row, ['3']), |
|
|
|
type: 'primary', |
|
|
@ -451,7 +451,7 @@ const butttondata = (row,$index) => { |
|
|
|
//defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // 单据打印 |
|
|
|
// 生成记录 |
|
|
|
{ |
|
|
|
label: '发货', |
|
|
|
label: t('ts.发货'), |
|
|
|
name: 'genRecords', |
|
|
|
hide: isShowMainButton(row, ['3']), |
|
|
|
type: 'primary', |
|
|
@ -496,7 +496,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'ssbq') { |
|
|
|
await SupplierdeliverRequestMainApi.selfCheckReport(row.masterId).then(async (res) => { |
|
|
|
if(!res){ |
|
|
|
message.warning("请先上传自检报告!") |
|
|
|
message.warning(t('ts.请先上传自检报告!')) |
|
|
|
return |
|
|
|
}else{ |
|
|
|
// 生成标签 |
|
|
@ -642,7 +642,7 @@ const handleUploadQualityReport = async (row) => { |
|
|
|
if(uploadFile){ |
|
|
|
uploadFile['componentProps']['upData']['tableId'] = row.masterId |
|
|
|
} |
|
|
|
ploadQualityReportRef.value.open('create', null, {masterId:row.masterId},'上传质检报告','上传质检报告')//创建标签页面 createLabel 标题 |
|
|
|
ploadQualityReportRef.value.open('create', null, {masterId:row.masterId},t('ts.上传质检报告'),t('ts.上传质检报告'))//创建标签页面 createLabel 标题 |
|
|
|
const tableFormKeys = {} |
|
|
|
|
|
|
|
SupplierdeliverInspectionDetail.allSchemas.tableFormColumns.forEach((item) => { |
|
|
@ -675,11 +675,11 @@ const submitFormUploadQualityReport = async (formType, data) => { |
|
|
|
const handleSub = async (id: number) => { |
|
|
|
try { |
|
|
|
// 提交审批的二次确认 |
|
|
|
await message.confirm('是否提交审批所选中数据?') |
|
|
|
await message.confirm(t('ts.是否提交审批所选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
|
// 发起提交审批 |
|
|
|
await SupplierdeliverRequestMainApi.subSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('提交审批成功!')) |
|
|
|
message.success(t('ts.提交审批成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch {}finally{ |
|
|
@ -691,11 +691,11 @@ const handleSub = async (id: number) => { |
|
|
|
const handleApp = async (id: number) => { |
|
|
|
try { |
|
|
|
// 审批通过的二次确认 |
|
|
|
await message.confirm('是否审批通过所选中数据?') |
|
|
|
await message.confirm(t('ts.是否审批通过所选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
|
// 发起审批通过 |
|
|
|
await SupplierdeliverRequestMainApi.appSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('审批通过成功!')) |
|
|
|
message.success(t('ts.审批通过成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch {}finally{ |
|
|
@ -707,11 +707,11 @@ const handleApp = async (id: number) => { |
|
|
|
const handleTur = async (id: number) => { |
|
|
|
try { |
|
|
|
// 驳回的二次确认 |
|
|
|
await message.confirm('是否驳回所选中数据?') |
|
|
|
await message.confirm(t('ts.是否驳回所选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
|
// 发起驳回 |
|
|
|
await SupplierdeliverRequestMainApi.rejSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('驳回成功!')) |
|
|
|
message.success(t('ts.驳回成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch {}finally{ |
|
|
@ -725,11 +725,11 @@ const genRecords = async (id: number) => { |
|
|
|
try { |
|
|
|
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(async res => { |
|
|
|
if(!res){ |
|
|
|
message.warning("请先上传自检报告!") |
|
|
|
message.warning(t('ts.请先上传自检报告!')) |
|
|
|
return |
|
|
|
}else{ |
|
|
|
// 处理的二次确认 |
|
|
|
await message.confirm('是否处理所选中数据?') |
|
|
|
await message.confirm(t('ts.是否处理所选中数据?')) |
|
|
|
getLoading = ElLoading.service({ |
|
|
|
lock: true, |
|
|
|
text: 'loading...', |
|
|
@ -737,7 +737,7 @@ const genRecords = async (id: number) => { |
|
|
|
}) |
|
|
|
// 发起处理 |
|
|
|
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { |
|
|
|
message.success(t('处理成功!')) |
|
|
|
message.success(t('ts.处理成功!')) |
|
|
|
// 刷新列表 |
|
|
|
getList() |
|
|
|
// 单据打印 |
|
|
@ -763,7 +763,7 @@ const handleExport = async () => { |
|
|
|
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( |
|
|
|
tableObject.params |
|
|
|
) |
|
|
|
download.excel(data, '供应商发货申请主.xlsx') |
|
|
|
download.excel(data, `${'ts.供应商发货申请主'}.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
@ -786,10 +786,10 @@ const submitFormLabel = async (formType, data) => { |
|
|
|
console.log("data==",data) |
|
|
|
data.subList = detatableData.tableList |
|
|
|
console.log("detatableData",detatableData) |
|
|
|
await message.confirm('是否为此数据生成标签?') |
|
|
|
await message.confirm(t('ts.是否为此数据生成标签?')) |
|
|
|
await SupplierdeliverRequestMainApi.genLabel(data) |
|
|
|
isCreateLabel.value = true |
|
|
|
message.success('创建标签成功') |
|
|
|
message.success(t('ts.创建标签成功')) |
|
|
|
getList() |
|
|
|
} finally { |
|
|
|
formLabelRef.value.formLoading = false |
|
|
@ -820,7 +820,7 @@ const labelPrint = async (row) => { |
|
|
|
tableColumns.forEach((item) => { |
|
|
|
item.width = item.table?.width || 150 |
|
|
|
}) |
|
|
|
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) |
|
|
|
searchTableRef.value.openData(t('ts.标签信息'),tableObjectPrint,{tableColumns},true) |
|
|
|
} |
|
|
|
|
|
|
|
// 批量打印--供应商发货申请 |
|
|
@ -831,7 +831,7 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r |
|
|
|
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)] |
|
|
|
// }) |
|
|
|
if(val.length == 0){ |
|
|
|
message.warning("请先选择要打印的数据!") |
|
|
|
message.warning(t('ts.请先选择要打印的数据')) |
|
|
|
return |
|
|
|
} |
|
|
|
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) |
|
|
@ -841,7 +841,7 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r |
|
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
message.error('创建标签失败') |
|
|
|
message.error(t('ts.创建标签失败')) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -884,7 +884,7 @@ const submitForm = async (formType, data) => { |
|
|
|
} |
|
|
|
}) |
|
|
|
if (isHave) { |
|
|
|
message.error('生产日期不可以大于过期日期') |
|
|
|
message.error(t('ts.生产日期不可以大于过期日期')) |
|
|
|
formRef.value.formLoading = false |
|
|
|
return |
|
|
|
} |
|
|
@ -893,7 +893,7 @@ const submitForm = async (formType, data) => { |
|
|
|
let planArriveStr = formatDate(data.planArriveTime); |
|
|
|
if(planArriveStr > planArriveTimeStr.value){ |
|
|
|
let confirmFlag = false; |
|
|
|
await message.confirm("计划到货时间大于要货计划送达日期是否继续?").then(() => { |
|
|
|
await message.confirm(t('ts.计划到货时间大于要货计划送达日期是否继续?')).then(() => { |
|
|
|
console.log("选择了OK") |
|
|
|
//选择OK |
|
|
|
}).catch(() => { |
|
|
@ -908,7 +908,7 @@ const submitForm = async (formType, data) => { |
|
|
|
} |
|
|
|
} |
|
|
|
if(tableData.value.length <= 0){ |
|
|
|
message.warning(`子表明细不能为空!`) |
|
|
|
message.warning(t('ts.子表明细不能为空!')) |
|
|
|
formRef.value.formLoading = false |
|
|
|
return; |
|
|
|
} |
|
|
@ -935,7 +935,7 @@ const handleImport = () => { |
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: '供应商发货申请主导入模版.xlsx' |
|
|
|
templateTitle: `${t('ts.供应商发货申请主导入模版')}.xlsx` |
|
|
|
}) |
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
|