|
@ -5,14 +5,14 @@ |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
|
<TableHead |
|
|
<TableHead |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
@button-base-click="buttonBaseClick" |
|
|
@button-base-click="buttonBaseClick" |
|
|
:routeName="routeName" |
|
|
:routeName="routeName" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@searchFormClick="searchFormClick" |
|
|
@searchFormClick="searchFormClick" |
|
|
:allSchemas="SupplierinvoiceRequestMain.allSchemas" |
|
|
:allSchemas="SupplierinvoiceRequestMain.allSchemas" |
|
|
|
|
|
|
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
@ -41,18 +41,18 @@ |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="formRef" |
|
|
ref="formRef" |
|
|
@success="getList" |
|
|
@success="getList" |
|
|
:isOpenSearchTable="true" |
|
|
:isOpenSearchTable="true" |
|
|
fieldTableColumn="poLine" |
|
|
fieldTableColumn="poLine" |
|
|
:showSearchTableQueryFields = "['poLine']" |
|
|
:showSearchTableQueryFields = "['poLine']" |
|
|
:rules="SupplierinvoiceRequestMainRules" |
|
|
:rules="SupplierinvoiceRequestMainRules" |
|
|
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" |
|
|
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" |
|
|
:searchTableParams="searchTableParams" |
|
|
:searchTableParams="searchTableParams" |
|
|
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" |
|
|
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" |
|
|
:tableFormRules="SupplierinvoiceRequestDetailRules" |
|
|
:tableFormRules="SupplierinvoiceRequestDetailRules" |
|
|
:tableData="tableData" |
|
|
:tableData="tableData" |
|
|
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel,sumFormDataHandle1)=>{ |
|
|
:sumFormDataByForm ="(formRef,formModel,tableData,formType,originFormModel,updateOriginFormModel,sumFormDataHandle1)=>{ |
|
|
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel |
|
|
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel |
|
|
// 2、系统税额:每条数据的合同价格X可开票数量,计算结果取两位小数之后*税率的计算结果,再保留2位。所有子表数据再求和 |
|
|
// 2、系统税额:每条数据的合同价格X可开票数量,计算结果取两位小数之后*税率的计算结果,再保留2位。所有子表数据再求和 |
|
@ -80,7 +80,7 @@ |
|
|
updateOriginFormModel(formModel) |
|
|
updateOriginFormModel(formModel) |
|
|
} |
|
|
} |
|
|
formRef.value.setValues({ |
|
|
formRef.value.setValues({ |
|
|
taxAmount:taxAmount_, |
|
|
taxAmount:taxAmount_, |
|
|
afterTaxAmount:amount+taxAmount, // 3、系统价税合计:系统未税金额+系统税额 |
|
|
afterTaxAmount:amount+taxAmount, // 3、系统价税合计:系统未税金额+系统税额 |
|
|
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6、价税合计金额:未税金额+税额 |
|
|
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6、价税合计金额:未税金额+税额 |
|
|
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//未税差额:未税金额-系统未税金额-折扣金额 |
|
|
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//未税差额:未税金额-系统未税金额-折扣金额 |
|
@ -88,9 +88,9 @@ |
|
|
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // 价税合计差额=未税差额+税额差异 |
|
|
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // 价税合计差额=未税差额+税额差异 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}" |
|
|
}" |
|
|
|
|
|
|
|
|
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{ |
|
|
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{ |
|
|
// 1、系统未税金额: 合同价格X可开票数量。每条数据的合同价格X可开票数量,计算结果取两位小数之后,求和 |
|
|
// 1、系统未税金额: 合同价格X可开票数量。每条数据的合同价格X可开票数量,计算结果取两位小数之后,求和 |
|
|
const {taxRate=0} = formModel |
|
|
const {taxRate=0} = formModel |
|
@ -100,19 +100,19 @@ |
|
|
} |
|
|
} |
|
|
formRef.value.setValues(sumObject) |
|
|
formRef.value.setValues(sumObject) |
|
|
}" |
|
|
}" |
|
|
|
|
|
|
|
|
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain" |
|
|
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain" |
|
|
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" |
|
|
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" |
|
|
:isBusiness="true" |
|
|
:isBusiness="true" |
|
|
@handleAddTable="handleAddTable" |
|
|
@handleAddTable="handleAddTable" |
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
:isShowReduceButtonSelection="true" |
|
|
:isShowReduceButtonSelection="true" |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
@sumFormDataHandle="sumFormDataHandle" |
|
|
@sumFormDataHandle="sumFormDataHandle" |
|
|
> |
|
|
> |
|
|
|
|
|
|
|
|
<template #selectionsActionspoLine="{selections}"> |
|
|
<template #selectionsActionspoLine="{selections}"> |
|
|
<div style="text-align: left;margin-right:10px"> |
|
|
<div style="text-align: left;margin-right:10px"> |
|
|
系统未税金额:{{Number(selections.reduce((prev, item) => prev + Number(Number(Number(Number(item['purchasePrice']).toFixed(4))*item['invoicableQuantity']).toFixed(2)),0)).toFixed(2)}} |
|
|
系统未税金额:{{Number(selections.reduce((prev, item) => prev + Number(Number(Number(Number(item['purchasePrice']).toFixed(4))*item['invoicableQuantity']).toFixed(2)),0)).toFixed(2)}} |
|
@ -129,26 +129,26 @@ |
|
|
</BasicForm> |
|
|
</BasicForm> |
|
|
|
|
|
|
|
|
<!-- 财务通过窗口 finance_mainPlanSub --> |
|
|
<!-- 财务通过窗口 finance_mainPlanSub --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="formFinanceRef" |
|
|
ref="formFinanceRef" |
|
|
:rules="SupplierinvoiceRequestFinanceRules" |
|
|
:rules="SupplierinvoiceRequestFinanceRules" |
|
|
:formAllSchemas="SupplierinvoiceRequestFinance.allSchemas" |
|
|
:formAllSchemas="SupplierinvoiceRequestFinance.allSchemas" |
|
|
:isBusiness="false" |
|
|
:isBusiness="false" |
|
|
:footButttondata="undefined" |
|
|
:footButttondata="undefined" |
|
|
@success="submitFormFinance" |
|
|
@success="submitFormFinance" |
|
|
/> |
|
|
/> |
|
|
<!-- 采购通过窗口--> |
|
|
<!-- 采购通过窗口--> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="formPurchasePassRef" |
|
|
ref="formPurchasePassRef" |
|
|
:rules="PurchasePassRules" |
|
|
:rules="PurchasePassRules" |
|
|
:formAllSchemas="PurchasePass.allSchemas" |
|
|
:formAllSchemas="PurchasePass.allSchemas" |
|
|
:isBusiness="false" |
|
|
:isBusiness="false" |
|
|
:footButttondata="undefined" |
|
|
:footButttondata="undefined" |
|
|
@success="submitPurchasePass" |
|
|
@success="submitPurchasePass" |
|
|
/> |
|
|
/> |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail |
|
|
<Detail |
|
|
ref="detailRef" |
|
|
ref="detailRef" |
|
|
:isOpenSearchTable="true" |
|
|
:isOpenSearchTable="true" |
|
|
fieldTableColumn="poLine" |
|
|
fieldTableColumn="poLine" |
|
|
:annexTable="detailAnnexTable" |
|
|
:annexTable="detailAnnexTable" |
|
@ -203,15 +203,15 @@ |
|
|
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(4)) |
|
|
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(4)) |
|
|
}) |
|
|
}) |
|
|
}" |
|
|
}" |
|
|
:isBasic="false" |
|
|
:isBasic="false" |
|
|
:allSchemas="SupplierinvoiceRequestDetailMain.allSchemas" |
|
|
:allSchemas="SupplierinvoiceRequestDetailMain.allSchemas" |
|
|
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" |
|
|
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" |
|
|
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" |
|
|
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" |
|
|
:searchTableParams="searchTableParams" |
|
|
:searchTableParams="searchTableParams" |
|
|
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail" |
|
|
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail" |
|
|
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail" |
|
|
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail" |
|
|
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage" |
|
|
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage" |
|
|
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" |
|
|
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" |
|
|
:Echo="Echo" |
|
|
:Echo="Echo" |
|
|
:detailButtonIsShowEdit="true" |
|
|
:detailButtonIsShowEdit="true" |
|
|
:detailButtonIsShowAddStatusArray="detailButtonIsShowAddStatusArray" |
|
|
:detailButtonIsShowAddStatusArray="detailButtonIsShowAddStatusArray" |
|
@ -245,9 +245,9 @@ import dayjs from 'dayjs' |
|
|
// 供应商发票申请 |
|
|
// 供应商发票申请 |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { SupplierinvoiceRequestMain, |
|
|
import { SupplierinvoiceRequestMain, |
|
|
SupplierinvoiceRequestMainRules, |
|
|
SupplierinvoiceRequestMainRules, |
|
|
SupplierinvoiceRequestDetail, |
|
|
SupplierinvoiceRequestDetail, |
|
|
SupplierinvoiceRequestDetailRules, |
|
|
SupplierinvoiceRequestDetailRules, |
|
|
SupplierinvoiceRequestFinance, |
|
|
SupplierinvoiceRequestFinance, |
|
|
SupplierinvoiceRequestFinanceRules, |
|
|
SupplierinvoiceRequestFinanceRules, |
|
@ -336,7 +336,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea |
|
|
// return `合计金额` |
|
|
// return `合计金额` |
|
|
|
|
|
|
|
|
// }) |
|
|
// }) |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -365,11 +365,11 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea |
|
|
newRow['arrivalQty'] = item['prhRcvd'] |
|
|
newRow['arrivalQty'] = item['prhRcvd'] |
|
|
newRow['id'] = item['id'] |
|
|
newRow['id'] = item['id'] |
|
|
newRow['currency'] = item['currency'] |
|
|
newRow['currency'] = item['currency'] |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// 切换供应商代码 |
|
|
// 切换供应商代码 |
|
|
if(formField=='supplierCode'&&val[0][searchField]!=searchFormRef.formModel.supplierCode){ |
|
|
if(formField=='supplierCode'&&val[0][searchField]!=searchFormRef.formModel.supplierCode){ |
|
@ -388,7 +388,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea |
|
|
const Echo = [] |
|
|
const Echo = [] |
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage // 分页接口 |
|
|
getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage // 分页接口 |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
@ -660,7 +660,7 @@ const handleImport = () => { |
|
|
} |
|
|
} |
|
|
console.log('defaultSupplierCode',defaultSupplierCode) |
|
|
console.log('defaultSupplierCode',defaultSupplierCode) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
// 获取部门 用于详情 部门回显 |
|
|
const { wsCache } = useCache() |
|
|
const { wsCache } = useCache() |
|
@ -715,8 +715,8 @@ const handleImport = () => { |
|
|
detailAnnexTable.value[1].hiddenDelete = true |
|
|
detailAnnexTable.value[1].hiddenDelete = true |
|
|
detailAnnexTable.value[1].hiddenUpload = true |
|
|
detailAnnexTable.value[1].hiddenUpload = true |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
detailRef.value.openDetail(row, titleName, titleValue,"requestSupplierinvoiceMain") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
/** 删除按钮操作 */ |
|
@ -808,7 +808,7 @@ const handleImport = () => { |
|
|
const submitPurchasePass = async (id, submitData) => { |
|
|
const submitPurchasePass = async (id, submitData) => { |
|
|
console.log(submitData) |
|
|
console.log(submitData) |
|
|
const id1 =submitData?.id || id |
|
|
const id1 =submitData?.id || id |
|
|
|
|
|
|
|
|
console.log(id1) |
|
|
console.log(id1) |
|
|
try { |
|
|
try { |
|
|
// 审批通过的二次确认 |
|
|
// 审批通过的二次确认 |
|
@ -879,7 +879,7 @@ const handleImport = () => { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 发票寄出确认按钮操作 */ |
|
|
/** 发票寄出确认按钮操作 */ |
|
|
const handleInvoiceSentOut = async (id : number) => { |
|
|
const handleInvoiceSentOut = async (id : number) => { |
|
|
try { |
|
|
try { |
|
@ -898,7 +898,7 @@ const handleImport = () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const resonSubmit = async (val, row)=>{ |
|
|
const resonSubmit = async (val, row)=>{ |
|
|
|
|
|
|
|
|
ElMessageBox.prompt(t('ts.请输入驳回原因'), t('ts.提示'), { |
|
|
ElMessageBox.prompt(t('ts.请输入驳回原因'), t('ts.提示'), { |
|
|
confirmButtonText: t('common.ok'), |
|
|
confirmButtonText: t('common.ok'), |
|
|
cancelButtonText: t('common.cancel'), |
|
|
cancelButtonText: t('common.cancel'), |
|
@ -1090,7 +1090,7 @@ const importSuccess = () => { |
|
|
handleDocumentPrint(clicKRowId.value) |
|
|
handleDocumentPrint(clicKRowId.value) |
|
|
}else if(val === 'printing-all'){ |
|
|
}else if(val === 'printing-all'){ |
|
|
//打印全部发货单 |
|
|
//打印全部发货单 |
|
|
handlePrintAll(clicKRowId.value) |
|
|
handlePrintAll(clicKRowId.value) |
|
|
}else if(val === 'export-detail'){ |
|
|
}else if(val === 'export-detail'){ |
|
|
console.log("导出明细:",clicKRowId.value) |
|
|
console.log("导出明细:",clicKRowId.value) |
|
|
handleDetailExport(clicKRowId.value) |
|
|
handleDetailExport(clicKRowId.value) |
|
@ -1130,7 +1130,7 @@ const importSuccess = () => { |
|
|
|
|
|
|
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
|
|
|
|
|
|
//供应商发货单打印 |
|
|
//供应商发货单打印 |
|
|
const documentSupplierdeliverRecordSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()) |
|
|
const documentSupplierdeliverRecordSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()) |
|
|
const handleSupplierdeliverRecordPrint = async (id) => { |
|
|
const handleSupplierdeliverRecordPrint = async (id) => { |
|
|
window.open(documentSupplierdeliverRecordSrc.value + '&id=' + id) |
|
|
window.open(documentSupplierdeliverRecordSrc.value + '&id=' + id) |
|
@ -1188,7 +1188,7 @@ const handleSelectionPoint = async ()=>{ |
|
|
detailButtonIsShowAddStatusArray.value = [] |
|
|
detailButtonIsShowAddStatusArray.value = [] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|