Browse Source

供应商发票--最新修改

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

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

@ -56,7 +56,7 @@
:sumFormDataByForm ="(formRef,formModel)=>{
const {taxRate=0,amount=0,taxAmount=0,adjustingTaxAmount=0} = formModel
formRef.value.setValues({
taxAmount:taxRate*amount*0.01+adjustingTaxAmount,
taxAmount:taxRate*amount*0.01,
afterTaxAmount:amount+taxAmount
})
}"
@ -76,6 +76,11 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
>
<template #foorter>
<div style="text-align: left">
{{ basicFormFooter }}
</div>
</template>
<template v-slot="{row}">
<el-input :disabled="true" :class="{'is-red': row['singlePrice'] - row['purchasePrice'] > 0}" :modelValue="((row['singlePrice']) - (row['purchasePrice'])).toFixed(6)"/>
</template>
@ -186,7 +191,8 @@
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data'
import { getAccessToken } from '@/utils/auth'
import { ElMessageBox } from 'element-plus'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { accountantFormart } from '@/utils/formatter'
defineOptions({ name: 'SupplierinvoiceRequestMain' })
@ -245,6 +251,17 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
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) => {
nextTick(() => {
@ -864,11 +881,21 @@ const handleImport = () => {
}
//
const submitForm = async (formType, data) => {
const submitForm = async (formType, submitData) => {
let data = {...submitData}
tableData.value.forEach((item) => {
item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(6))
})
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 {
if (formType === 'create') {
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',
formatter: accountantFormart,
table: {
@ -246,31 +246,21 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '税额',
field: 'taxAmount',
label: '额',
field: 'beforeTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:3,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
isForm:false,
isTableForm:false
},
{
label: '额',
field: 'beforeTaxAmount',
label: '税额',
field: 'totalTaxAmount',
formatter: accountantFormart,
table: {
width: 150
@ -291,7 +281,29 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
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',
formatter: accountantFormart,
table: {
@ -377,8 +389,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
},
{
label: '总差额',
field: 'totalDifference',
label: '折扣金额',
field: 'discountAmount1',
formatter: accountantFormart,
table: {
width: 150
@ -396,6 +408,27 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
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: '金税票号',
field: 'goldenTaxInvoiceNumber',

Loading…
Cancel
Save