Browse Source

供应商发票修改打印标签

intex_online20250311
叶佳兴 3 months ago
parent
commit
ba4bf18f27
  1. 113
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  2. 18
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -88,7 +88,7 @@
beforeTaxDiffAmount = 0,
taxAmountDiff = 0,
rebateTax = 0,
claimAmount = 0,
claimAmount = 0
} = formModel
// 2X*2
if (formType == 'update') {
@ -167,7 +167,9 @@
0
)
}
sumObject.invoiceAmountMain = (Number(sumObject.amount) -Number(formRef.value.formModel.claimAmount)).toFixed(2), // -
;(sumObject.invoiceAmountMain = (
Number(sumObject.amount) - Number(formRef.value.formModel.claimAmount)
).toFixed(2)), // -
formRef.value.setValues(sumObject)
}
"
@ -217,7 +219,16 @@
</template>
<template #table>
<div>
<div style="padding-left: 10px;border-left: 6px solid #409eff;margin:10px 0px;font-size: 16px;font-weight: bold;">索赔明细</div>
<div
style="
padding-left: 10px;
border-left: 6px solid #409eff;
margin: 10px 0px;
font-size: 16px;
font-weight: bold;
"
>索赔明细</div
>
<!-- <Table
:columns="ClaimDetails.allSchemas.tableColumns"
:data="tableObject.tableList"
@ -231,11 +242,14 @@
style='width: calc(100% - 32px);'
/> -->
<div
style="border: 1px solid #dedede;
style="
border: 1px solid #dedede;
border-radius: 8px;
padding: 10px;
width: calc(100% - 32px);
display: flex;">
display: flex;
"
>
<TableForm
ref="tableFormRef"
class="w-[100%]"
@ -245,8 +259,6 @@
:isShowReduceButton="false"
/>
</div>
</div>
</template>
</BasicForm>
@ -359,15 +371,24 @@
>
<!-- 价税合计尾差 -->
<template #Descriptions_totalTaxDiffAmount="{ row }">
<span>{{row['totalTaxDiffAmount']}}<span class="red-text"> (含返利合计:{{ row['rebateTotal'] }})</span></span>
<span
>{{ row['totalTaxDiffAmount']
}}<span class="red-text"> (含返利合计:{{ row['rebateTotal'] }})</span></span
>
</template>
<!-- 未税尾差 -->
<template #Descriptions_beforeTaxDiffAmount="{ row }">
<span>{{row['beforeTaxDiffAmount']}}<span class="red-text"> (含返利未税:{{ row['discountAmount1'] }})</span></span>
<span
>{{ row['beforeTaxDiffAmount']
}}<span class="red-text"> (含返利未税:{{ row['discountAmount1'] }})</span></span
>
</template>
<!-- 税额尾差 -->
<template #Descriptions_taxAmountDiff="{ row }">
<span>{{row['taxAmountDiff']}}<span class="red-text"> (含返利税额:{{ row['rebateTax'] }})</span></span>
<span
>{{ row['taxAmountDiff']
}}<span class="red-text"> (含返利税额:{{ row['rebateTax'] }})</span></span
>
</template>
<template #differencePrice="{ row }">
<span :class="{ 'red-text': row.differencePrice != 0 }">{{ row.differencePrice }}</span>
@ -501,7 +522,6 @@ const searchTableSuccessDetail = async (
// })
const detailData = ref()
const detailOpenForm = (type, row) => {
detailData.value = row
@ -638,14 +658,13 @@ const searchTableSuccess = (formField, searchField, val, searchFormRef, type, ro
//
const handleAllocationPrice = async () => {
let res = await SupplierinvoiceRequestDetailApi.handleAllocationPrice(tableData.value)
tableData.value.forEach(item=>{
let findItem = res.find(item1=>item1.id == item?.id)
tableData.value.forEach((item) => {
let findItem = res.find((item1) => item1.id == item?.id)
if (findItem) {
item['allocationPrice'] = findItem['allocationPrice']
}
})
console.log('模具分摊单价', res)
}
const Echo = []
@ -797,7 +816,7 @@ const butttondata = (row, $index) => {
{
label: t('ts.打印'),
name: 'mian_print',
hide: !(roleList.value.indexOf('financial_accounting') > -1 && row.status == 5),
hide: !(row.goldenTaxInvoiceNumber != null && row.goldenTaxInvoiceNumber != ''),
type: 'primary',
color: '',
link: true, //
@ -939,8 +958,8 @@ const openForm = async (type: string, row?: any) => {
item.value = defaultSupplierCode.value
item.componentProps.isSearchList = true
item.componentProps.disabled = false
claimDetailsList.value = [];
claimDetails(item.value);
claimDetailsList.value = []
claimDetails(item.value)
}
//
if (item.field == 'orderType') {
@ -989,13 +1008,21 @@ const openForm = async (type: string, row?: any) => {
//
const claimDetailsList = ref([])
const claimDetails = async (supplierCode) => {
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(supplierCode)
formRef.value.formRef.formModel.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5)
formRef.value.formRef.formModel.invoiceAmountMain = (Number(formRef.value.formRef.formModel.amount) -Number(formRef.value.formModel.claimAmount)).toFixed(2) // -
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(
supplierCode
)
formRef.value.formRef.formModel.claimAmount = claimDetailsList.value
.map((item) => item.claimAmount)
.reduce((prev, item) => prev + item)
.toFixed(5)
formRef.value.formRef.formModel.invoiceAmountMain = (
Number(formRef.value.formRef.formModel.amount) - Number(formRef.value.formModel.claimAmount)
).toFixed(2) // -
}
//
const claimDetailsForUpdate = async (supplierCode, id) => {
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailListForUpdate(supplierCode,id)
claimDetailsList.value =
await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailListForUpdate(supplierCode, id)
}
//
const checkInvoicingCalendar = async () => {
@ -1016,7 +1043,6 @@ const getDefaultSupplier = async () => {
console.log('defaultSupplierCode', defaultSupplierCode)
}
//
const { wsCache } = useCache()
/** 详情操作 */
@ -1463,7 +1489,7 @@ const submitForm = async (formType, submitData) => {
)
})
let flagInvoicableQuantity = false
tableData.value.forEach(item => {
tableData.value.forEach((item) => {
// 0
// 0
if (item.invoicableQuantity == 0) {
@ -1473,16 +1499,20 @@ const submitForm = async (formType, submitData) => {
if (item.maxInvoicableQuantity > 0) {
if (item.invoicableQuantity < 0 || item.invoicableQuantity > item.maxInvoicableQuantity) {
flagInvoicableQuantity = true
message.error(`${item.itemCode}`+t('ts.可开票数量范围是')+`:0~${item.maxInvoicableQuantity}`)
message.error(
`${item.itemCode}` + t('ts.可开票数量范围是') + `:0~${item.maxInvoicableQuantity}`
)
}
} else {
if (item.invoicableQuantity > 0 || item.invoicableQuantity < item.maxInvoicableQuantity) {
flagInvoicableQuantity = true
message.error(`${item.itemCode}`+t('ts.可开票数量范围是')+`:${item.maxInvoicableQuantity}~0`)
message.error(
`${item.itemCode}` + t('ts.可开票数量范围是') + `:${item.maxInvoicableQuantity}~0`
)
}
}
}
});
})
if (flagInvoicableQuantity) {
return
}
@ -1592,24 +1622,33 @@ const handleSupplierdeliverRecordPrint = async (id) => {
window.open(documentSupplierdeliverRecordSrc.value + '&id=' + id)
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/936875675614240768?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
const srcPoint = ref(BASE_URL + '/jmreport/view/972723426543935488?token=' + getAccessToken())
const srcPoint = ref(BASE_URL + '/jmreport/view/1055372875454808064?token=' + getAccessToken())
const handleSelectionPoint = async () => {
console.log(selectionRows.value)
let rows: any = []
let rows1: any = []
selectionRows.value.forEach((item) => {
rows = [...rows, ...item.selectionRows.map((item1) => item1.id)]
item.selectionRows.forEach((cur) => {
if (cur.goldenTaxInvoiceNumber == null || cur.goldenTaxInvoiceNumber == '') {
// rows = [...rows, ...item.selectionRows.map((item1) => item1.id)]
rows.push(cur.id)
} else {
rows1.push(cur.id)
}
})
if (rows.length == 0) {
message.warning('至少选择一条数据!')
})
if (rows.length != 0&&rows1.length == 0) {
message.warning('所选数据中金税票号不能为空!')
return
}
console.log('批量打印', rows.join(','))
window.open(srcPoint.value + '&ids=' + rows.join(','))
window.open(srcPoint.value + '&ids=' + rows1.join(','))
}
//
const handleDocumentPrint = async (id) => {
window.open(srcPoint.value + '&ids=' + id)
}
const handlePrintAll = async (masterId) => {

18
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -640,6 +640,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',
isTable:true,
isDetail:true,
table: {
width: 200,
},
@ -1635,6 +1637,22 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
precision: 2,
},
},
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',
isTable:true,
isDetail:true,
table: {
width: 200,
},
sortTableDefault:10,
form:{
componentProps: {
maxlength:20,
showWordLimit:true
}
}
},
]))

Loading…
Cancel
Save