Browse Source

HL-5499供应商发票作废功能

hella_online_20240823
wangyufei 3 months ago
parent
commit
63d01c03c2
  1. 40
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  2. 85
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

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

@ -44,17 +44,20 @@
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<!-- 表单弹窗发票回转 -->
<!--
:apiUpdate="BasicEamProductionlineApi.updateBasicEamProductionline"
:apiCreate="BasicEamProductionlineApi.createBasicEamProductionline"
@searchTableSuccess="searchTableSuccess" -->
<BasicForm
ref="formRef"
@success="getList"
:rules="SupplierinvoiceRecordMainRules"
:formAllSchemas="SupplierinvoiceRecordMain.allSchemas"
:tableAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:tableFormRules="SupplierinvoiceRecordDetailRules"
:isBusiness="true"
ref="basicFormRef"
@success="()=>{alert(1)}"
:rules="SupplierinvoiceRecordMainTransferRules"
:formAllSchemas="SupplierinvoiceRecordMainTransfer.allSchemas"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -143,7 +146,7 @@
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordMainRules,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain } from './supplierinvoiceRecordMain.data'
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordMainRules,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain,SupplierinvoiceRecordMainTransfer,SupplierinvoiceRecordMainTransferRules } from './supplierinvoiceRecordMain.data'
import * as SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMain'
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -242,16 +245,31 @@ const butttondata = (row,$index) => {
color: '',
hasPermi: '',
link: true, //
}
},
// {
// label: t('ts.'),
// name: 'transfer',
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// hide:!(row['status']==5&&!!row['voucherNumber']),
// link: true, //
// }
]
}
/** 添加/修改操作 */
const basicFormRef = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'open_detail') { //
openDetail(row, '单据号', row.number)
}else if(val == 'transfer'){
//
basicFormRef.value.open('create', row)
}
}
//
const { wsCache } = useCache()
/** 详情操作 */

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

@ -467,6 +467,17 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:6,
isForm: false
},
// {
// label: '回转凭证号',
// field: 'transferNumber',
// sort: 'custom',
// table: {
// width: 200,
// },
// isTable:true,
// sortTableDefault:6,
// isForm: false
// },
{
label: '业务类型',
field:'businessType',
@ -808,7 +819,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false,
table: {
width: 150,
width: 200,
fixed: 'right'
},
}
@ -1620,3 +1631,75 @@ export const SupplierinvoiceRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
// 发票回转
export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '冲销日记帐',
field: 'reverseInvoiceJournal',
form: {
componentProps: {
value:'APINVCOR',
disabled: true,
}
},
},
{
label: '调整账代码',
field: 'adjustmentJournal',
form: {
componentProps: {
value:'APINVCOR',
disabled: true,
}
},
},
{
label: '过账日期',
field: 'reversepostingdate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
sortTableDefault:11,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
{
label: '说明',
field: 'tcCInvoiceRemark',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: true,
isDetail:false,
form: {
componentProps: {
type:"textarea",
maxlength:50,
showWordLimit:true
}
}
}
]))
//表单校验
export const SupplierinvoiceRecordMainTransferRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
})

Loading…
Cancel
Save