Browse Source

供应商发票申请4位

hella_online_20240829
wangyufei 4 months ago
parent
commit
f336cc9c37
  1. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  2. 19
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
  3. 4
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue
  4. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

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

@ -32,7 +32,7 @@
</el-button> </el-button>
</template> </template>
<template #differencePrice="{row}"> <template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(2) }}</span> <span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(4) }}</span>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
@ -115,7 +115,7 @@
<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(2))*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)}}
</div> </div>
</template> </template>
<!-- <template #foorter> <!-- <template #foorter>
@ -124,7 +124,7 @@
</div> </div>
</template> --> </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(2)"/> <el-input :disabled="true" :class="{'is-red': row['singlePrice'] - row['purchasePrice'] > 0}" :modelValue="((row['singlePrice']) - (row['purchasePrice'])).toFixed(4)"/>
</template> </template>
</BasicForm> </BasicForm>
@ -200,7 +200,7 @@
:sumFormDataByForm ="(formRef,formModel)=>{ :sumFormDataByForm ="(formRef,formModel)=>{
const {singlePrice=0,purchasePrice=0} = formModel const {singlePrice=0,purchasePrice=0} = formModel
formRef.value.setValues({ formRef.value.setValues({
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(2)) differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(4))
}) })
}" }"
:isBasic="false" :isBasic="false"
@ -1032,7 +1032,7 @@ const handleImport = () => {
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
let data = {...submitData} let data = {...submitData}
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(2)) item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(4))
}) })
data.subList = tableData.value // data.subList = tableData.value //
console.log('data',data) console.log('data',data)

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

@ -1473,19 +1473,6 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
}, },
])) ]))
const priceFormart = (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
}
const singlePriceFormart = (row, column, cellValue) => { const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(4) cellValue= Number(cellValue).toFixed(4)
@ -1743,7 +1730,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{ {
label: '单价差额', label: '单价差额',
field: 'differencePrice', field: 'differencePrice',
formatter: priceFormart, formatter: singlePriceFormart,
table: { table: {
width: 150 width: 150
}, },
@ -1751,14 +1738,14 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
componentProps: { componentProps: {
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 4,
} }
}, },
tableForm:{ tableForm:{
type: 'slot', type: 'slot',
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 4,
} }
}, },
{ {

4
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue

@ -38,7 +38,7 @@
</el-button> </el-button>
</template> </template>
<template #differencePrice="{row}"> <template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(2) }}</span> <span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(4) }}</span>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -98,7 +98,7 @@
:sumFormDataByForm ="(formRef,formModel)=>{ :sumFormDataByForm ="(formRef,formModel)=>{
const {singlePrice=0,purchasePrice=0} = formModel const {singlePrice=0,purchasePrice=0} = formModel
formRef.value.setValues({ formRef.value.setValues({
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(2)) differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(4))
}) })
}" }"
:isBasic="false" :isBasic="false"

10
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

@ -1497,7 +1497,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
])) ]))
const singlePriceFormart = (row, column, cellValue) => { const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(2) cellValue= Number(cellValue).toFixed(4)
cellValue = cellValue + '' || '' cellValue = cellValue + '' || ''
let x = cellValue.split('.') let x = cellValue.split('.')
@ -1739,14 +1739,14 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
componentProps: { componentProps: {
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 4,
} }
}, },
tableForm:{ tableForm:{
type: 'InputNumber', type: 'InputNumber',
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 4,
} }
}, },
{ {
@ -1760,14 +1760,14 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
componentProps: { componentProps: {
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 4,
} }
}, },
tableForm:{ tableForm:{
type: 'slot', type: 'slot',
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 4,
} }
}, },
{ {

Loading…
Cancel
Save