Browse Source

发票回转功能

hella_online_20240828
wangyufei 3 months ago
parent
commit
01f38ebcc9
  1. 6
      src/api/wms/supplierinvoiceRecordMain/index.ts
  2. 4
      src/locales/en-US.ts
  3. 4
      src/locales/zh-CN.ts
  4. 37
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  5. 11
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

6
src/api/wms/supplierinvoiceRecordMain/index.ts

@ -52,6 +52,12 @@ export const deleteSupplierinvoiceRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/supplierinvoice-record-main/delete?id=` + id })
}
// 发票回转
export const reverseSupplierinvoiceRecordMain = async (data: SupplierinvoiceRecordMainVO) => {
return await request.post({ url: `/wms/supplierinvoice-record-main/reverse`, data })
}
// 导出供应商发票记录主 Excel
export const exportSupplierinvoiceRecordMain = async (params) => {
console.log(params)

4
src/locales/en-US.ts

@ -1283,7 +1283,9 @@ export default {
'确认撤销报工吗?': 'Are you sure to cancel the job application?',
'收货数量不可以大于订单数量!': 'The received quantity cannot exceed the order quantity',
:'Revocation of work report successful',
:'The date of production cannot be less than'
:'The date of production cannot be less than',
:'Return of invoice',
:'The invoice has been successfully forwarded'
},

4
src/locales/zh-CN.ts

@ -1279,7 +1279,9 @@ export default {
'确认撤销报工吗?': "确认撤销报工吗?",
'收货数量不可以大于订单数量!':'收货数量不可以大于订单数量',
:'撤销报工成功',
:'生产日期不能小于'
:'生产日期不能小于',
:'发票回转',
:'发票回转成功'
},
}

37
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -51,7 +51,7 @@
@searchTableSuccess="searchTableSuccess" -->
<BasicForm
ref="basicFormRef"
@success="()=>{alert(1)}"
@success="submitForm"
:rules="SupplierinvoiceRecordMainTransferRules"
:formAllSchemas="SupplierinvoiceRecordMainTransfer.allSchemas"
:isBusiness="false"
@ -246,16 +246,16 @@ const butttondata = (row,$index) => {
hasPermi: '',
link: true, //
},
// {
// label: t('ts.'),
// name: 'transfer',
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// hide:!(row['status']==5&&!!row['voucherNumber']),
// link: true, //
// }
{
label: t('ts.发票回转'),
name: 'transfer',
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:supplierinvoice-record-main:reverse',
hide:!(row['status']==5&&!!row['voucherNumber']),
link: true, //
}
]
}
/** 添加/修改操作 */
@ -270,6 +270,21 @@ const buttonTableClick = async (val, row) => {
}
}
//
const submitForm = async (formType, data) => {
data.reverseInvoiceJournal = 'APINVCOR'
data.adjustmentJournal = 'APADJ'
console.log('发票回转',formType, data)
loadStart()
try{
await SupplierinvoiceRecordMainApi.reverseSupplierinvoiceRecordMain(data)
message.success(t('ts.发票回转成功'))
basicFormRef.value.dialogVisible = false
} finally {
loadDone()
}
}
//
const { wsCache } = useCache()
/** 详情操作 */

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

@ -1,6 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { accountantFormart } from '@/utils/formatter'
import dayjs from 'dayjs'
/**
* @returns {Array}
@ -1646,7 +1647,7 @@ export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive<CrudSch
field: 'adjustmentJournal',
form: {
componentProps: {
value:'APINVCOR',
value:'APADJ',
disabled: true,
}
},
@ -1666,6 +1667,7 @@ export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive<CrudSch
form: {
component: 'DatePicker',
componentProps: {
value:dayjs().valueOf(),
style: {width:'100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
@ -1694,8 +1696,11 @@ export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive<CrudSch
//表单校验
export const SupplierinvoiceRecordMainTransferRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
reversepostingdate: [
{ required: true, message: '请选择过账日期', trigger: 'change' }
],
tcCInvoiceRemark: [
{ required: true, message: '请填写说明', trigger: 'change' }
],
})

Loading…
Cancel
Save