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> </Table>
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗发票回转 -->
<!--
:apiUpdate="BasicEamProductionlineApi.updateBasicEamProductionline"
:apiCreate="BasicEamProductionlineApi.createBasicEamProductionline"
@searchTableSuccess="searchTableSuccess" -->
<BasicForm <BasicForm
ref="formRef" ref="basicFormRef"
@success="getList" @success="()=>{alert(1)}"
:rules="SupplierinvoiceRecordMainRules" :rules="SupplierinvoiceRecordMainTransferRules"
:formAllSchemas="SupplierinvoiceRecordMain.allSchemas" :formAllSchemas="SupplierinvoiceRecordMainTransfer.allSchemas"
:tableAllSchemas="SupplierinvoiceRecordDetail.allSchemas" :isBusiness="false"
:tableFormRules="SupplierinvoiceRecordDetailRules"
:isBusiness="true"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
@ -143,7 +146,7 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' 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 SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMain'
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil' import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -242,16 +245,31 @@ const butttondata = (row,$index) => {
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'open_detail') { // if (val == 'open_detail') { //
openDetail(row, '单据号', row.number) openDetail(row, '单据号', row.number)
}else if(val == 'transfer'){
//
basicFormRef.value.open('create', row)
} }
} }
// //
const { wsCache } = useCache() 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, sortTableDefault:6,
isForm: false isForm: false
}, },
// {
// label: '回转凭证号',
// field: 'transferNumber',
// sort: 'custom',
// table: {
// width: 200,
// },
// isTable:true,
// sortTableDefault:6,
// isForm: false
// },
{ {
label: '业务类型', label: '业务类型',
field:'businessType', field:'businessType',
@ -808,7 +819,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
}, },
} }
@ -1620,3 +1631,75 @@ export const SupplierinvoiceRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' } { 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