Browse Source

HL-5620供应商发票申请、提交审批、编辑 供应商确认 采购点击审批通过

hella_online_20240828
zhang_li 3 months ago
parent
commit
3d94b6ef35
  1. 67
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

67
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -382,7 +382,7 @@ const searchList = (model) => {
selectionRows.value = [] selectionRows.value = []
let model1 = { let model1 = {
...model, ...model,
statuss: model.status.join(',')?model.status.join(','):'' statuss: model.status.join(',') ? model.status.join(',') : ''
} }
delete model1.status delete model1.status
setSearchParams(model1) setSearchParams(model1)
@ -673,6 +673,12 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'purchase_mainPlanSub') { } else if (val == 'purchase_mainPlanSub') {
// //
// handleApp(row.id) // handleApp(row.id)
//
const res = await checkInvoicingCalendar()
if (res?.flag) {
message.alertWarning(res.msg)
return
}
if (row.balanceStatementStatus) { if (row.balanceStatementStatus) {
formPurchasePassRef.value.open('update', row, null, '采购审批通过', '采购审批通过') formPurchasePassRef.value.open('update', row, null, '采购审批通过', '采购审批通过')
} else { } else {
@ -813,21 +819,21 @@ const openForm = async (type: string, row?: any) => {
} }
if (row && row.procurementCreator) row.procurementCreator = Number(row.procurementCreator) if (row && row.procurementCreator) row.procurementCreator = Number(row.procurementCreator)
// //
SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then((res) => { const res = await checkInvoicingCalendar()
if (res.flag) { if (res?.flag) {
message.alertWarning(res.msg) message.alertWarning(res.msg)
return return
} }
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
// if(type=='create'){ }
// nextTick(() => { //
// formRef.value.formRef.setValues({ const checkInvoicingCalendar = async () => {
// procurementCreator:procurementCreators.value[0].id let resData = ''
// }) await SupplierinvoiceRequestMainApi.checkInvoicingCalendar({}).then((res) => {
// }) resData = res
// }
}) })
return resData
} }
const defaultSupplierCode = ref('') const defaultSupplierCode = ref('')
const getDefaultSupplier = async () => { const getDefaultSupplier = async () => {
@ -983,6 +989,12 @@ const handleOpe = async (id: number) => {
/** 提交审批按钮操作 */ /** 提交审批按钮操作 */
const handleSub = async (id: number) => { const handleSub = async (id: number) => {
try { try {
//
const res = await checkInvoicingCalendar()
if (res?.flag) {
message.alertWarning(res.msg)
return
}
// //
await message.confirm(t('ts.是否提交审批所选中数据?')) await message.confirm(t('ts.是否提交审批所选中数据?'))
tableObject.loading = true tableObject.loading = true
@ -1081,6 +1093,12 @@ const handleTur = async (id: number, cause: string) => {
/** 发票寄出确认按钮操作 */ /** 发票寄出确认按钮操作 */
const handleInvoiceSentOut = async (id: number) => { const handleInvoiceSentOut = async (id: number) => {
try { try {
//
const res = await checkInvoicingCalendar()
if (res?.flag) {
message.alertWarning(res.msg)
return
}
// //
await message.confirm(t('ts.是否确认发票寄出选中数据?')) await message.confirm(t('ts.是否确认发票寄出选中数据?'))
tableObject.loading = true tableObject.loading = true
@ -1165,7 +1183,7 @@ const genRecords = async (id: number) => {
/** 导出按钮操作 */ /** 导出按钮操作 */
const handleExport = async () => { const handleExport = async () => {
console.log(111) console.log(111)
let rows: any = [] let rows: any = []
selectionRows.value.forEach((item) => { selectionRows.value.forEach((item) => {
rows = [...rows, ...item.selectionRows.map((item1) => item1.number)] rows = [...rows, ...item.selectionRows.map((item1) => item1.number)]
@ -1181,8 +1199,8 @@ const handleExport = async () => {
} else { } else {
paramsData = { ...paramsData, checkNums: rows } 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 delete paramsData.createTime
} }
try { try {
// //
@ -1410,11 +1428,16 @@ const getLoginUserRoleList = async () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(async (item) => {
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(async item=>{ if (item.field == 'procurementCreator') {
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 item.componentProps.options = procurementCreators.list
} }
}) })

Loading…
Cancel
Save