Browse Source

供应商发票--最新修改

master_hella_20240701
wangyufei 5 months ago
parent
commit
0dd2940bbb
  1. 94
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  2. 31
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  3. 75
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

94
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { accountantFormart } from '@/utils/formatter'
/** /**
* @returns {Array} * @returns {Array}
@ -35,6 +36,18 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:2, sortTableDefault:2,
isForm: false isForm: false
}, },
{
label: '税率',
field: 'taxRate',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:3,
form: {
component: 'InputNumber',
}
},
{ {
label: '财务凭证号', label: '财务凭证号',
field: 'voucher_number', field: 'voucher_number',
@ -53,7 +66,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
sortTableDefault:8, sortTableDefault:7,
isForm:false, isForm:false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -93,45 +106,69 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9, sortTableDefault:5,
isSearch: true isSearch: true
}, },
{ {
label: '税额', label: '系统税额',
field: 'taxAmount', field: 'taxAmount',
formatter: accountantFormart,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:4, sortTableDefault:8,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} }
}, },
{ {
label: '税金额',//税后金额 label: '税金额',
field: 'afterTaxAmount', field: 'beforeTaxAmount',
sort: 'custom', formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:5, sortTableDefault:3,
form: { isForm:false,
component: 'InputNumber', isTableForm:false
}
}, },
{ {
label: '税', label: '税',
field: 'taxRate', field: 'totalTaxAmount',
sort: 'custom', formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:3, sortTableDefault:3,
isForm:false,
isTableForm:false
},
{
label: '价税合计金额',
field: 'adTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:3,
isForm:false,
isTableForm:false
},
{
label: '系统价税合计',//税后金额
field: 'afterTaxAmount',
formatter: accountantFormart,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:9,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} }
}, },
{ {
label: '价差',//总差额 label: '价差',//总差额
field: 'totalDifference', field: 'totalDifference',
@ -154,13 +191,14 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '金额', label: '系统未税金额',
field: 'amount', field: 'amount',
formatter: accountantFormart,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:7, sortTableDefault:8,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} }
@ -171,6 +209,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '索赔金额', label: '索赔金额',
field: 'claimAmount', field: 'claimAmount',
formatter: accountantFormart,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -183,6 +222,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '调整价差', label: '调整价差',
field: 'discountAmount', field: 'discountAmount',
formatter: accountantFormart,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -195,6 +235,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '调整税额', label: '调整税额',
field: 'adjustingTaxAmount', field: 'adjustingTaxAmount',
formatter: accountantFormart,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -208,6 +249,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '未税差额', label: '未税差额',
field: 'untaxedDifference', field: 'untaxedDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -228,6 +270,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '含税差额', label: '含税差额',
field: 'taxInclusiveDifference', field: 'taxInclusiveDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -264,7 +307,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
sortTableDefault:10, sortTableDefault:4,
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 180
@ -282,7 +325,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isForm:false, isForm:false,
isSearch:false, isSearch:false,
sortTableDefault:11 sortTableDefault:10
}, },
{ {
label: '过账日期', label: '过账日期',
@ -291,7 +334,8 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
isTable: false, isTable: true,
sortTableDefault:6,
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 180
@ -461,7 +505,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '采购审批时间', label: '采购审批时间',
field: 'procurementCreateTime', field: 'procurementCreateTime',
sortTableDefault:12, sortTableDefault:11,
isTable: true, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
@ -480,13 +524,13 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:13, sortTableDefault:12,
isForm: false, isForm: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
field: 'financialCreateTime', field: 'financialCreateTime',
sortTableDefault:14, sortTableDefault:13,
isTable: true, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
@ -504,7 +548,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
sortTableDefault:15, sortTableDefault:14,
isTable: true, isTable: true,
isSearch: false, isSearch: false,
isForm: false, isForm: false,
@ -516,7 +560,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
sortTableDefault:16, sortTableDefault:15,
isTable: true, isTable: true,
isSearch: false, isSearch: false,
isForm: false, isForm: false,
@ -784,6 +828,7 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '未税差额', label: '未税差额',
field: 'untaxedDifference', field: 'untaxedDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
@ -803,6 +848,7 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '含税差额', label: '含税差额',
field: 'taxInclusiveDifference', field: 'taxInclusiveDifference',
formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },

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

@ -56,7 +56,7 @@
:sumFormDataByForm ="(formRef,formModel)=>{ :sumFormDataByForm ="(formRef,formModel)=>{
const {taxRate=0,amount=0,taxAmount=0,adjustingTaxAmount=0} = formModel const {taxRate=0,amount=0,taxAmount=0,adjustingTaxAmount=0} = formModel
formRef.value.setValues({ formRef.value.setValues({
taxAmount:taxRate*amount*0.01+adjustingTaxAmount, taxAmount:taxRate*amount*0.01,
afterTaxAmount:amount+taxAmount afterTaxAmount:amount+taxAmount
}) })
}" }"
@ -76,6 +76,11 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
> >
<template #foorter>
<div style="text-align: left">
{{ basicFormFooter }}
</div>
</template>
<template v-slot="{row}"> <template v-slot="{row}">
<el-input :disabled="true" :class="{'is-red': row['singlePrice'] - row['purchasePrice'] > 0}" :modelValue="((row['singlePrice']) - (row['purchasePrice'])).toFixed(6)"/> <el-input :disabled="true" :class="{'is-red': row['singlePrice'] - row['purchasePrice'] > 0}" :modelValue="((row['singlePrice']) - (row['purchasePrice'])).toFixed(6)"/>
</template> </template>
@ -187,6 +192,7 @@
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import { accountantFormart } from '@/utils/formatter'
defineOptions({ name: 'SupplierinvoiceRequestMain' }) defineOptions({ name: 'SupplierinvoiceRequestMain' })
@ -245,6 +251,17 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
detailRef.value.updateList() detailRef.value.updateList()
} }
const basicFormFooter = computed(()=>{
let formModel = formRef.value?.formRef?.formModel
if(formModel){
let price1 = formModel.amount+formModel.discountAmount+formModel.discountAmount1
let price2 = formModel.taxAmount+formModel.adjustingTaxAmount
return `合计金额:未税金额=${accountantFormart(undefined,undefined,price1)};税额=${accountantFormart(undefined,undefined,price2)};价税合计金额=${accountantFormart(undefined,undefined,price1+price2)}`
}
return `合计金额`
})
// //
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => { const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => {
nextTick(() => { nextTick(() => {
@ -864,11 +881,21 @@ const handleImport = () => {
} }
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, submitData) => {
let data = {...submitData}
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(6)) item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(6))
}) })
data.subList = tableData.value // data.subList = tableData.value //
if(data){
// \\
let price1 = data.amount+data.discountAmount+data.discountAmount1
let price2 = data.taxAmount+data.adjustingTaxAmount
data.beforeTaxAmount = price1
data.totalTaxAmount = price2
data.adTaxAmount = price1+price2
}
try { try {
if (formType === 'create') { if (formType === 'create') {
if(data.subList.length == 0){ if(data.subList.length == 0){

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

@ -213,7 +213,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
{ {
label: '金额', label: '系统未税金额',
field: 'amount', field: 'amount',
formatter: accountantFormart, formatter: accountantFormart,
table: { table: {
@ -246,31 +246,21 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
}, },
{ {
label: '税额', label: '额',
field: 'taxAmount', field: 'beforeTaxAmount',
formatter: accountantFormart, formatter: accountantFormart,
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:3, sortTableDefault:3,
form: { isForm:false,
component: 'InputNumber', isTableForm:false
componentProps: {
min: 0,
precision: 6,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
}, },
{ {
label: '额', label: '税额',
field: 'beforeTaxAmount', field: 'totalTaxAmount',
formatter: accountantFormart, formatter: accountantFormart,
table: { table: {
width: 150 width: 150
@ -291,7 +281,29 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isTableForm:false isTableForm:false
}, },
{ {
label: '税后金额', label: '系统税额',
field: 'taxAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:3,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '系统价税合计',
field: 'afterTaxAmount', field: 'afterTaxAmount',
formatter: accountantFormart, formatter: accountantFormart,
table: { table: {
@ -377,8 +389,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
{ {
label: '总差额', label: '折扣金额',
field: 'totalDifference', field: 'discountAmount1',
formatter: accountantFormart, formatter: accountantFormart,
table: { table: {
width: 150 width: 150
@ -396,6 +408,27 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
precision: 6, precision: 6,
} }
}, },
// {
// label: '总差额',
// field: 'totalDifference',
// formatter: accountantFormart,
// table: {
// width: 150
// },
// isTable:false,
// form: {
// component: 'InputNumber',
// componentProps: {
// precision: 6,
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 0,
// precision: 6,
// }
// },
{ {
label: '金税票号', label: '金税票号',
field: 'goldenTaxInvoiceNumber', field: 'goldenTaxInvoiceNumber',

Loading…
Cancel
Save