Browse Source

YT-2401《供应商发票申请》《供应商发票记录》明细页面增加字段YT-2391SCP供应商开票申请明细中增加字段,具体见图,导出明细时也要导出新加的字段。供应商开票记录页面也要同步修改。

intex_online20250506
张立 4 weeks ago
parent
commit
3261fe0ed3
  1. 101
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  2. 43
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  3. 196
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -1691,6 +1691,30 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
isDetail: false,
isTable: true,
},
{
label: '受入号',
field: 'receivedNumber',
table: {
width: 150
},
sortTableDefault: 4,
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '车型',
field: 'project',
table: {
width: 150
},
sortTableDefault: 4,
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '到货时间',
field: 'planArriveTime',
@ -1799,6 +1823,59 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
disabled: true
}
},
{
label: '税率(%)',
field: 'taxRate',
dictType: DICT_TYPE.TAX_RATE_DICT,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '金额(税额)',
field: 'singleAndAllocateTaxAmount',
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '金额(合计金额)',
field: 'singleAndAllocateTotal',
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '金额(含模具费)',
field: 'singleAndAllocateAmount',
formatter: singlePriceFormart,
table: {
width: 150
},
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '总差额',
field: 'differencePriceTotal',
@ -1826,6 +1903,18 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
disabled: true
}
},
{
label: '金额(模具费)',
field: 'allocationAmount',
formatter: singlePriceFormart,
table: {
width: 150
},
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
{
label: '模具分摊单价',
field: 'allocationPrice',
@ -1846,6 +1935,18 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
precision: 2,
}
},
{
label: '含模具费单价',
field: 'singleAndAllocatePrice',
formatter: singlePriceFormart,
table: {
width: 150
},
isForm: false,
isTableForm: false,
isDetail: false,
isTable: true,
},
// {
// label: '未税差额',
// field: 'untaxedDifference',

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

@ -556,7 +556,8 @@ const detailData = ref()
const detailOpenForm = (type, row) => {
detailData.value = row
}
const detailBasicFormOnChange = (field, cur) => {
const detailBasicFormOnChange = (field, cur, detailFormRef) => {
console.log('detailBasicFormOnChange', field, cur)
if (field == 'invoicableQuantity') {
// 0
@ -572,8 +573,27 @@ const detailBasicFormOnChange = (field, cur) => {
}
}
}
detailData.value['invoicableQuantity'] = cur
handleDetailAllocationPrice(detailFormRef)
} else if (field == 'singlePrice') {
detailData.value['singlePrice'] = cur
handleDetailAllocationPrice(detailFormRef)
}
}
const handleDetailAllocationPrice = async (detailFormRef) => {
console.log(777,detailFormRef.value.formModel)
//=() + 5
detailFormRef.value.formModel['singleAndAllocatePrice'] = Number((Number(detailFormRef.value.formModel['singlePrice']) + Number(detailFormRef.value.formModel['allocationPrice'])).toFixed(5))
//()=*2
detailFormRef.value.formModel['allocationAmount'] = Number((Number(detailFormRef.value.formModel['allocationPrice']) * Number(detailFormRef.value.formModel['invoicableQuantity'])).toFixed(2))
//()=*2
detailFormRef.value.formModel['singleAndAllocateAmount'] = Number((Number(detailFormRef.value.formModel['singleAndAllocatePrice']) * Number(detailFormRef.value.formModel['invoicableQuantity'])).toFixed(2))
//() = ()*
detailFormRef.value.formModel['singleAndAllocateTaxAmount'] = Number((Number(detailFormRef.value.formModel['singleAndAllocateAmount']) * Number(detailFormRef.value.formModel.taxRate) * 0.01).toFixed(5))
//() = () + ()
detailFormRef.value.formModel['singleAndAllocateTotal'] =Number((Number(detailFormRef.value.formModel['singleAndAllocateTaxAmount'])+Number(detailFormRef.value.formModel['singleAndAllocateAmount'])).toFixed(2))
}
const handleDetailSubmitForm = async (formType, data) => {
if (formType === 'update') {
console.log('handleDetailSubmitForm', data)
@ -611,12 +631,19 @@ const inputNumberChange = (field, index, row, val) => {
}
}
handleAllocationPrice()
}else if (field == 'singlePrice') {
handleAllocationPrice()
}
}
const onChange = (field, cur) => {
console.log('onChange', field)
if (field == 'orderType') {
tableData.value = []
} else if (field == 'taxRate') {
if (tableData.value.length > 0) {
tableData.value.forEach(item=>item.taxRate =cur)
handleAllocationPrice()
}
}
}
@ -658,6 +685,9 @@ const searchTableSuccess = (formField, searchField, val, searchFormRef, type, ro
newRow['id'] = item['id']
newRow['backNumber'] = item['backNumber']
newRow['currency'] = item['currency']
newRow['receivedNumber'] = item['receivedNumber']
newRow['project'] = item['project']
newRow['taxRate'] = formRef.value.formRef.formModel.taxRate
}
tableData.value.push(newRow)
})
@ -691,7 +721,18 @@ const handleAllocationPrice = async () => {
tableData.value.forEach((item) => {
let findItem = res.find((item1) => item1.id == item?.id)
if (findItem) {
//
item['allocationPrice'] = findItem['allocationPrice']
//=() + 5
item['singleAndAllocatePrice'] = Number((Number(item['singlePrice']) + Number(item['allocationPrice'])).toFixed(5))
//()=*2
item['allocationAmount'] = Number((Number(item['allocationPrice']) * Number(item['invoicableQuantity'])).toFixed(2))
//()=*2
item['singleAndAllocateAmount'] = Number((Number(item['singleAndAllocatePrice']) * Number(item['invoicableQuantity'])).toFixed(2))
//() = ()*
item['singleAndAllocateTaxAmount'] = Number((Number(item['singleAndAllocateAmount']) * Number(formRef.value.formRef.formModel.taxRate) * 0.01).toFixed(5))
//() = () + ()
item['singleAndAllocateTotal'] =Number((Number(item['singleAndAllocateTaxAmount'])+Number(item['singleAndAllocateAmount'])).toFixed(2))
}
})
console.log('模具分摊单价', res)

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

@ -130,6 +130,14 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudS
label: '背番',
field: 'backNumber'
},
{
label: '受入号',
field: 'receivedNumber'
},
{
label: '车型',
field: 'project'
},
{
label: '创建时间',
field: 'createTime',
@ -1003,7 +1011,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'InputNumber',
componentProps: {
precision: 5,
precision: 2,
disabled: true,
}
},
@ -1768,7 +1776,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
form: {
component: 'InputNumber',
componentProps: {
precision: 5,
precision: 2,
disabled: true,
}
},
@ -1954,7 +1962,19 @@ const singlePriceFormart = (row, column, cellValue) => {
}
return x1+x2
}
const singlePriceFormart1 = (row, column, cellValue) => {
cellValue = Number(cellValue).toFixed(2)
cellValue = cellValue + '' || ''
let x = cellValue.split('.')
let x1 = x[0]
let x2 = x.length > 1 ? '.' + x[1] : ''
const reg = /(\d+)(\d{3})/
while (reg.test(x1)) {
x1 = x1.replace(reg, '$1,$2')
}
return x1 + x2
}
function validateTaxRate(rule, value, callback) {
if (value>0) {
callback()
@ -2130,7 +2150,36 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isDetail: false,
isTable: true,
},
{
label: '受入号',
field: 'receivedNumber',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '车型',
field: 'project',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
//仅是主列表页面的筛选搜索条件
{
label: '收货日期',
@ -2235,8 +2284,19 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
isForm:false,
tableForm:{
disabled: true
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
disabled: true,
min: 0,
precision:2,
}
},
{
@ -2249,6 +2309,90 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm:{
disabled: true
}
},
{
label: '税率(%)',
field: 'taxRate',
dictType: DICT_TYPE.TAX_RATE_DICT,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled:true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '金额(税额)',
field: 'singleAndAllocateTaxAmount',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component:'InputNumber',
componentProps: {
disabled: true,
precision: 2,
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 2,
}
},
{
label: '金额(合计金额)',
field: 'singleAndAllocateTotal',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
precision: 2,
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 2,
}
},
{
label: '金额(含模具费)',
field: 'singleAndAllocateAmount',
formatter: singlePriceFormart1,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
precision:2,
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision:2,
}
},
{
label: '总差额',
@ -2281,6 +2425,26 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
min: 0,
precision: 5,
}
},
{
label: '金额(模具费)',
field: 'allocationAmount',
formatter: singlePriceFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
precision: 5,
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 5,
}
},
{
label: '模具分摊单价',
@ -2289,8 +2453,28 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
isForm:false,
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
precision: 5,
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 5,
}
},
{
label: '含模具费单价',
field: 'singleAndAllocatePrice',
formatter: singlePriceFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
precision: 5,

Loading…
Cancel
Save