|
|
@ -673,6 +673,12 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'purchase_mainPlanSub') { |
|
|
|
// 采购审批通过 |
|
|
|
// handleApp(row.id) |
|
|
|
// 校验是否可以开票 |
|
|
|
const res = await checkInvoicingCalendar() |
|
|
|
if (res?.flag) { |
|
|
|
message.alertWarning(res.msg) |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.balanceStatementStatus) { |
|
|
|
formPurchasePassRef.value.open('update', row, null, '采购审批通过', '采购审批通过') |
|
|
|
} else { |
|
|
@ -813,21 +819,21 @@ const openForm = async (type: string, row?: any) => { |
|
|
|
} |
|
|
|
if (row && row.procurementCreator) row.procurementCreator = Number(row.procurementCreator) |
|
|
|
// 校验是否可以开票 |
|
|
|
SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then((res) => { |
|
|
|
if (res.flag) { |
|
|
|
const res = await checkInvoicingCalendar() |
|
|
|
if (res?.flag) { |
|
|
|
message.alertWarning(res.msg) |
|
|
|
return |
|
|
|
} |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
formRef.value.open(type, row) |
|
|
|
// if(type=='create'){ |
|
|
|
// nextTick(() => { |
|
|
|
// formRef.value.formRef.setValues({ |
|
|
|
// procurementCreator:procurementCreators.value[0].id |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
} |
|
|
|
// 校验是否可以开票 |
|
|
|
const checkInvoicingCalendar = async () => { |
|
|
|
let resData = '' |
|
|
|
await SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then((res) => { |
|
|
|
resData = res |
|
|
|
}) |
|
|
|
return resData |
|
|
|
} |
|
|
|
const defaultSupplierCode = ref('') |
|
|
|
const getDefaultSupplier = async () => { |
|
|
@ -983,6 +989,12 @@ const handleOpe = async (id: number) => { |
|
|
|
/** 提交审批按钮操作 */ |
|
|
|
const handleSub = async (id: number) => { |
|
|
|
try { |
|
|
|
// 校验是否可以开票 |
|
|
|
const res = await checkInvoicingCalendar() |
|
|
|
if (res?.flag) { |
|
|
|
message.alertWarning(res.msg) |
|
|
|
return |
|
|
|
} |
|
|
|
// 提交审批的二次确认 |
|
|
|
await message.confirm(t('ts.是否提交审批所选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
@ -1081,6 +1093,12 @@ const handleTur = async (id: number, cause: string) => { |
|
|
|
/** 发票寄出确认按钮操作 */ |
|
|
|
const handleInvoiceSentOut = async (id: number) => { |
|
|
|
try { |
|
|
|
// 校验是否可以开票 |
|
|
|
const res = await checkInvoicingCalendar() |
|
|
|
if (res?.flag) { |
|
|
|
message.alertWarning(res.msg) |
|
|
|
return |
|
|
|
} |
|
|
|
// 驳回的二次确认 |
|
|
|
await message.confirm(t('ts.是否确认发票寄出选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
@ -1181,7 +1199,7 @@ const handleExport = async () => { |
|
|
|
} else { |
|
|
|
paramsData = { ...paramsData, checkNums: rows } |
|
|
|
} |
|
|
|
if (!paramsData.createTime || paramsData.createTime && paramsData.createTime.length == 0) { |
|
|
|
if (!paramsData.createTime || (paramsData.createTime && paramsData.createTime.length == 0)) { |
|
|
|
delete paramsData.createTime |
|
|
|
} |
|
|
|
try { |
|
|
@ -1410,11 +1428,16 @@ const getLoginUserRoleList = async () => { |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
|
|
|
|
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(async item=>{ |
|
|
|
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(async (item) => { |
|
|
|
if (item.field == 'procurementCreator') { |
|
|
|
//采购审批人 |
|
|
|
const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) |
|
|
|
const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ |
|
|
|
roleCode: 'purchase', |
|
|
|
pageSize: 1000, |
|
|
|
pageNo: 1, |
|
|
|
sort: '', |
|
|
|
by: 'ASC' |
|
|
|
}) |
|
|
|
item.componentProps.options = procurementCreators.list |
|
|
|
} |
|
|
|
}) |
|
|
|