Browse Source

发票

master_hella_20240701
wangyufei 5 months ago
parent
commit
a4f134781b
  1. 4
      src/api/wms/supplierinvoiceRequestMain/index.ts
  2. 2
      src/components/BasicForm/src/BasicForm.vue
  3. 55
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  4. 254
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  5. 330
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

4
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -89,8 +89,8 @@ export const invoiceSentOutSupplierinvoiceRequestMain = async (id: number) => {
}
// 财务--审批通过供应商发货申请主
export const financeappSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id })
export const financeappSupplierinvoiceRequestMain = async (data) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp`, data })
}
// 财务--驳回供应商发货申请主
export const financerejSupplierinvoiceRequestMain = async (data) => {

2
src/components/BasicForm/src/BasicForm.vue

@ -494,7 +494,7 @@ watch(()=>props.tableData,() => {
})
watch(()=>unref(formRef)?.formModel,() => {
if(props?.sumFormDataByForm&&unref(formRef)?.formModel){
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData)
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel,props.tableData,formType.value)
}
},{
deep:true

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

@ -318,7 +318,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:10
},
{
label: '过账时间',
label: '过账日期',
field: 'postingDate',
formatter: dateFormatter,
detail: {
@ -329,7 +329,17 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 180
}
},
isSearch: true,
search: {
value:[],
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD',
type: 'daterange',
defaultTime: [new Date('1 '), new Date('1 ')]
}
},
},
{
label: '财务凭证号',
@ -593,6 +603,47 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '凭证描述',
field: 'voucherNumberRemark',
isTable:true,
isTableForm:false,
sort: 'custom',
table: {
width: 180
},
isForm: false,
},
{
label: '未税差额',
field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
isForm:false,
isTableForm:false
},
{
label: '税额差异',
field: 'taxAmountDiff',
formatter: accountantFormart,
table: {
width: 150
},
isForm:false,
isTableForm:false
},
{
label: '价税合计差额',
field: 'totalTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
isForm:false,
isTableForm:false
},
]))
//表单校验

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

@ -32,7 +32,7 @@
</el-button>
</template>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(5) }}</span>
<span :class="{'red-text':row.differencePrice!=0}">{{ Number(row.differencePrice).toFixed(2) }}</span>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
@ -53,19 +53,37 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:sumFormDataByForm ="(formRef,formModel)=>{
const {taxRate=0,amount=0,taxAmount=0,adjustingTaxAmount=0} = formModel
:sumFormDataByForm ="(formRef,formModel,tableData,formType)=>{
const {taxRate=0,amount=0,taxAmount=0,beforeTaxAmount=0,totalTaxAmount=0,discountAmount1=0,beforeTaxDiffAmount=0,taxAmountDiff=0} = formModel
// 2X*2
let taxAmount_ = 0.00
if(formType=='update'){ //
taxAmount_ = taxAmount
}else if(formType=='create'){ //
taxAmount_ = tableData.reduce((prev, item) => prev + Number(Number(taxRate*0.01*Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2))).toFixed(2)),0)
}
console.log('sumFormDataByForm',tableData)
console.log('taxAmount_',taxAmount_)
if(tableData)
formRef.value.setValues({
taxAmount:taxRate*amount*0.01,
afterTaxAmount:amount+taxAmount
taxAmount:taxAmount_,
afterTaxAmount:amount+taxAmount, // 3+
adTaxAmount:beforeTaxAmount+totalTaxAmount, //6+
beforeTaxDiffAmount:beforeTaxAmount-amount-discountAmount1,//--
taxAmountDiff:totalTaxAmount-taxAmount,// -
totalTaxDiffAmount:beforeTaxDiffAmount+taxAmountDiff // =+
})
}"
:sumFormDataByTableCustom ="(formRef,formModel,tableData)=>{
// 1 XX
const sumObject = {
amount:tableData.reduce((prev, item) => prev + (item['singlePrice']*item['invoicableQuantity']),0)
amount:tableData.reduce((prev, item) => prev + Number(Number(item['singlePrice']*item['invoicableQuantity']).toFixed(2)),0)
}
formRef.value.setValues(sumObject)
}"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true"
@ -76,16 +94,26 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
>
<template #foorter>
<!-- <template #foorter>
<div style="text-align: left">
{{ basicFormFooter }}
</div>
</template>
</template> -->
<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(2)"/>
</template>
</BasicForm>
<!-- 财务通过窗口 finance_mainPlanSub -->
<BasicForm
ref="formFinanceRef"
:rules="SupplierinvoiceRequestFinanceRules"
:formAllSchemas="SupplierinvoiceRequestFinance.allSchemas"
:isBusiness="false"
:footButttondata="undefined"
@success="submitFormFinance"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -137,7 +165,7 @@
:sumFormDataByForm ="(formRef,formModel)=>{
const {singlePrice=0,purchasePrice=0} = formModel
formRef.value.setValues({
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(6))
differencePrice:Number((Number(singlePrice)-Number(purchasePrice)).toFixed(2))
})
}"
:isBasic="false"
@ -183,7 +211,10 @@
import { SupplierinvoiceRequestMain,
SupplierinvoiceRequestMainRules,
SupplierinvoiceRequestDetail,
SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data'
SupplierinvoiceRequestDetailRules,
SupplierinvoiceRequestFinance,
SupplierinvoiceRequestFinanceRules
} from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -251,16 +282,16 @@ 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 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) => {
@ -461,7 +492,7 @@ const handleImport = () => {
} else if (val == 'invoice_sent_out') { //
handleInvoiceSentOut(row.id)
} else if(val == 'finance_mainPlanSub'){ //
handleFinanceApp(row.id)
handleFinanceApp(row)
} else if(val == 'finance_mainPlanTur'){ //
resonSubmit(val, row)
// handleFinaceTur(row.masterId)
@ -493,73 +524,27 @@ const handleImport = () => {
if(item.field == 'orderType'){
item.componentProps.disabled = true
}
//
if(row.status=='1'||row.status=='6'){
if(item.field == 'procurementCreator'){
//
item.componentProps.disabled = false
}
if(item.field == 'taxRate'){
//
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'adjustingTaxAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount1'){
item.componentProps.disabled = false
}
//
if(item.field == 'goldenTaxInvoiceNumber'){
item.componentProps.disabled = false
}
//
if(item.field == 'invoiceTime'){
// ---taxRate\beforeTaxAmount\totalTaxAmount\goldenTaxInvoiceNumber\invoiceTime
if(item.field == 'taxRate'||item.field == 'beforeTaxAmount'||item.field == 'totalTaxAmount'||item.field == 'goldenTaxInvoiceNumber'||item.field == 'invoiceTime'){
if(row.status=='1'||row.status=='3'||row.status=='6'||row.status=='7'){
item.componentProps.disabled = false
}
}else{
//
if(item.field == 'procurementCreator'){
}else{
item.componentProps.disabled = true
}
//
if(item.field == 'taxRate'){
item.componentProps.disabled = true
}
//
if(item.field == 'discountAmount'){
item.componentProps.disabled = true
}
//
if(item.field == 'adjustingTaxAmount'){
item.componentProps.disabled = true
}
//
if(item.field == 'discountAmount1'){
item.componentProps.disabled = true
}
//
if(item.field == 'goldenTaxInvoiceNumber'){
item.componentProps.disabled = true
}
//
if(item.field == 'invoiceTime'){
}
// ---procurementCreatordiscountAmount1
if(item.field == 'procurementCreator'||item.field == 'discountAmount1'){
if(row.status=='1'||row.status=='6'){
item.componentProps.disabled = false
}else{
item.componentProps.disabled = true
}
}
})
}else{
//
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {
//
if(item.field == 'supplierCode'){
//
@ -571,44 +556,23 @@ const handleImport = () => {
if(item.field == 'orderType'){
item.componentProps.disabled = false
}
//
if(item.field == 'procurementCreator'){
item.componentProps.disabled = false
}
//
if(item.field == 'taxRate'){
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'adjustingTaxAmount'){
item.componentProps.disabled = false
}
//
if(item.field == 'discountAmount1'){
item.componentProps.disabled = false
}
//
if(item.field == 'goldenTaxInvoiceNumber'){
item.componentProps.disabled = false
}
//
if(item.field == 'invoiceTime'){
// \ \ \\\\
if(item.field == 'taxRate'||item.field == 'procurementCreator'||item.field == 'beforeTaxAmount'||item.field == 'totalTaxAmount'||item.field == 'goldenTaxInvoiceNumber'||item.field == 'invoiceTime'||item.field == 'discountAmount1'){
item.componentProps.disabled = false
}
})
}
if(row && (row.status == '3' || row.status == '7')){
SupplierinvoiceRequestMainRules.beforeTaxAmount[0].required = true //
SupplierinvoiceRequestMainRules.totalTaxAmount[0].required = true //
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true //
SupplierinvoiceRequestMainRules.invoiceTime[0].required = true
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true
}else{
SupplierinvoiceRequestMainRules.beforeTaxAmount[0].required = false //
SupplierinvoiceRequestMainRules.totalTaxAmount[0].required = false //
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = false //
SupplierinvoiceRequestMainRules.invoiceTime[0].required = false
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = false
}
if(row&&row.procurementCreator) row.procurementCreator = Number(row.procurementCreator)
//
@ -662,10 +626,7 @@ const handleImport = () => {
clicKRowId.value = row.id
//
if(roleList.value.indexOf('purchase')>-1&&row.status=='2'){
detailAnnexTable.value[0].hiddenDelete = false
detailAnnexTable.value[0].hiddenUpload = false
}else if(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='1' || row.status=='6')){
if(row.status=='1'||row.status=='2'||row.status=='6'){
detailAnnexTable.value[0].hiddenDelete = false
detailAnnexTable.value[0].hiddenUpload = false
}else{
@ -673,7 +634,7 @@ const handleImport = () => {
detailAnnexTable.value[0].hiddenUpload = true
}
//
if(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='3'||row.status=='7')){
if(row.status=='3'||row.status=='7'){
detailAnnexTable.value[1].hiddenDelete = false
detailAnnexTable.value[1].hiddenUpload = false
}else{
@ -787,21 +748,35 @@ const handleImport = () => {
}
/** 审批通过按钮操作 */
const handleFinanceApp = async (id : number) => {
try {
//
await message.confirm(t('ts.是否审批通过所选中数据?'))
tableObject.loading = true
//
await SupplierinvoiceRequestMainApi.financeappSupplierinvoiceRequestMain(id)
message.success(t('ts.审批通过成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
/** 审批通过按钮操作 finance_mainPlanSub */
const formFinanceRef = ref()
const handleFinanceApp = async (row) => {
formFinanceRef.value.open('update', row,null,'财务通过','财务通过')
}
const submitFormFinance = async (formType, submitData) => {
let data = {...submitData}
console.log('submitFormFinance',data)
await SupplierinvoiceRequestMainApi.financeappSupplierinvoiceRequestMain({
id:data.id,
postingDate:data.postingDate,
voucherNumberRemark:data.voucherNumberRemark,
})
formFinanceRef.value.dialogVisible = false
getList()
// try {
// //
// await message.confirm(t('ts.'))
// tableObject.loading = true
// //
// await SupplierinvoiceRequestMainApi.financeappSupplierinvoiceRequestMain(id)
// message.success(t('ts.!'))
// tableObject.loading = false
// //
// await getList()
// } catch { }finally{
// tableObject.loading = false
// }
}
/** 驳回按钮操作 */
@ -967,18 +942,10 @@ const handleImport = () => {
const submitForm = async (formType, submitData) => {
let data = {...submitData}
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(2))
})
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
}
console.log('data',data)
try {
if (formType === 'create') {
if(data.subList.length == 0){
@ -1108,11 +1075,12 @@ const importSuccess = () => {
}else{
roleList.value = []
}
if(roleList.value.indexOf('supplier_operator')>-1){
detailButtonIsShowAddStatusArray.value = ['1','6']
}else{
detailButtonIsShowAddStatusArray.value = []
}
detailButtonIsShowAddStatusArray.value = ['1','6']
// if(roleList.value.indexOf('supplier_operator')>-1){
// detailButtonIsShowAddStatusArray.value = ['1','6']
// }else{
// detailButtonIsShowAddStatusArray.value = []
// }
}
/** 初始化 **/

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

@ -203,7 +203,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:6,
sortTableDefault:9,
isSearch: true,
form: {
value: '1',
@ -219,17 +219,17 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:5,
sortTableDefault:8,
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 6,
precision: 2,
}
},
{
@ -245,39 +245,39 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
},
{
label: '未税金额',
field: 'beforeTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:3,
isForm:false,
isTableForm:false
},
{
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: 'beforeTaxAmount',
// formatter: accountantFormart,
// table: {
// width: 150
// },
// sortTableDefault:3,
// isForm:false,
// isTableForm:false
// },
// {
// 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: 'taxAmount',
@ -285,17 +285,17 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:3,
sortTableDefault:6,
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 6,
precision: 2,
}
},
{
@ -305,18 +305,18 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:3,
sortTableDefault:7,
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
precision: 2,
disabled: true,
}
},
@ -335,18 +335,57 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
precision: 2,
}
},
// {
// label: '调整价差',
// field: 'discountAmount',
// formatter: accountantFormart,
// table: {
// width: 150
// },
// isTable:false,
// form: {
// component: 'InputNumber',
// componentProps: {
// precision: 2,
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 0,
// precision: 2,
// }
// },
// {
// label: '调整税额',
// field: 'adjustingTaxAmount',
// table: {
// width: 150
// },
// isTable:false,
// form: {
// component: 'InputNumber',
// componentProps: {
// precision: 2,
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 0,
// precision: 2,
// }
// },
{
label: '调整价差',
field: 'discountAmount',
label: '折扣金额',
field: 'discountAmount1',
formatter: accountantFormart,
table: {
width: 150
@ -355,53 +394,113 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
precision: 2,
}
},
{
label: '调整税额',
field: 'adjustingTaxAmount',
label: '未税金额',
field: 'beforeTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
isTable:false,
sortTableDefault:3,
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
isTableForm:false,
},
{
label: '折扣金额',
field: 'discountAmount1',
label: '税额',
field: 'totalTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
isTable:false,
sortTableDefault:4,
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
disabled: true,
}
},
isTableForm:false,
},
{
label: '价税合计金额',
field: 'adTaxAmount',
formatter: accountantFormart,
table: {
width: 150
},
sortTableDefault:5,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
isTableForm:false,
},
{
label: '未税差额',
field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
isTableForm:false,
},
{
label: '税额差异',
field: 'taxAmountDiff',
formatter: accountantFormart,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
isTableForm:false,
},
{
label: '价税合计差额',
field: 'totalTaxDiffAmount',
formatter: accountantFormart,
table: {
width: 150
},
isTableForm:false,
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
// {
@ -415,13 +514,13 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
// form: {
// component: 'InputNumber',
// componentProps: {
// precision: 6,
// precision: 2,
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 0,
// precision: 6,
// precision: 2,
// }
// },
{
@ -430,7 +529,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150,
},
sortTableDefault:7,
sortTableDefault:10,
form:{
componentProps: {
maxlength:23,
@ -458,7 +557,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
sortTableDefault:8,
sortTableDefault:11,
form: {
component: 'DatePicker',
componentProps: {
@ -481,7 +580,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isTableForm: false,
isForm:false,
isSearch:false,
sortTableDefault:9
sortTableDefault:12
},
{
label: '过账日期',
@ -495,9 +594,11 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 180
},
isTable:false,
isDetail:false,
form: {
component: 'DatePicker',
componentProps: {
disabled: true,
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
@ -505,6 +606,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
},
},
{
label: '申请时间',
field: 'requestTime',
@ -647,12 +749,12 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
// }
}
},
{
label: '采购审批时间',
field: 'procurementCreateTime',
isTable: true,
sortTableDefault:10,
sortTableDefault:13,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -670,7 +772,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
sortTableDefault:11,
sortTableDefault:14,
isForm: false,
},
{
@ -679,7 +781,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
sortTableDefault:14,
sortTableDefault:16,
isTable: true,
isSearch: false,
isForm: false,
@ -691,7 +793,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
sortTableDefault:15,
sortTableDefault:17,
isTable: true,
isSearch: false,
isForm: false,
@ -701,7 +803,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
label: '财务审批时间',
field: 'financialCreateTime',
isTable: true,
sortTableDefault:12,
sortTableDefault:15,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -912,9 +1014,59 @@ export const SupplierinvoiceRequestMainRules = reactive({
procurementCreator: [
{ required: true, message: '请选择采购员', trigger: 'change' }
],
beforeTaxAmount: [
{ required: true, message: '请输入未税金额', trigger: 'change' }
],
totalTaxAmount: [
{ required: true, message: '请输入税额', trigger: 'change' }
],
})
export const SupplierinvoiceRequestFinance = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '过账日期',
field: 'postingDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '凭证描述',
field: 'voucherNumberRemark',
sort: 'custom',
isTable:false,
form: {
component: 'Input',
componentProps:{
type: 'textarea'
}
},
},
]))
export const SupplierinvoiceRequestFinanceRules = reactive({
postingDate: [
{ required: true, message: '请选择过账日期', trigger: 'change' }
],
voucherNumberRemark: [
{ max: 50, message: '不得超过40个字符', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
@ -1022,13 +1174,13 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
precision: 2,
}
},
{
@ -1042,13 +1194,13 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
componentProps: {
disabled: true,
min: 0,
precision: 6,
precision: 2,
}
},
tableForm:{
disabled: true,
min: 0,
precision: 6,
precision: 2,
}
},
{
@ -1062,14 +1214,14 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
componentProps: {
disabled: true,
min: 0,
precision: 6,
precision: 2,
}
},
tableForm:{
type: 'slot',
disabled: true,
min: 0,
precision: 6,
precision: 2,
}
},
{
@ -1219,7 +1371,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
{
label: '未税差额',
label: '未税差额',//子表数据
field: 'untaxedDifference',
formatter: accountantFormart,
table: {
@ -1228,13 +1380,13 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
precision: 2,
}
},
{
@ -1247,13 +1399,13 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'InputNumber',
componentProps: {
precision: 6,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
precision: 2,
}
},

Loading…
Cancel
Save