diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index b3e752a7b..1c25c05c5 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -68,14 +68,24 @@ export const cloSupplierinvoiceRequestMain = async (id: number) => { export const subSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id }) } -// 审批通过供应商发货申请主 +// 供应商--审批通过供应商发货申请主 export const appSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id }) } -// 驳回供应商发货申请主 +// 供应商--驳回供应商发货申请主 export const rejSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id }) } + +// 财务--审批通过供应商发货申请主 +export const financeappSupplierinvoiceRequestMain = async (id: number) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id }) +} +// 财务--驳回供应商发货申请主 +export const financerejSupplierinvoiceRequestMain = async (id: number) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/financeRej?id=` + id }) +} + // 生成记录 export const genRecordsSupplierinvoiceRequestMain = async (id) => { return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id }) @@ -89,3 +99,7 @@ export const exportSupplierinvoiceRequestMain = async (params) => { } } +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 1bb8a0389..ade3d6fdd 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -65,6 +65,17 @@ :Echo="Echo" /> + + + diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 4f2f11589..8116caf7a 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -5,7 +5,6 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su const { t } = useI18n() // 国际化 import * as getRequestsettingApi from '@/api/wms/requestsetting/index' -import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 @@ -27,47 +26,30 @@ const requestsettingData = data?.list[0] || {} const userDeptArray:any = [userDept] - - export const PurchaseReceiptOrReturnRecordMain = useCrudSchemas(reactive([ +/** + * @returns {Array} 采购订单或者采购退货单 + */ +export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([ { - label: '单据号', - field: 'number' + label: '项目编码', + field: 'projectCode' }, { - label: '供应商代码', - field: 'supplierCode' + label: '单据类型', + field: 'billType' }, { - label: '发货单号', - field: 'asnNumber' + label: '单据号', + field: 'recvBillNum' }, { - label: '备注', - field: 'remark', + label: '发货单号', + field: 'asnBillNum' }, { - label: '创建时间', - field: 'createTime', - isTable: true, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - isTableForm: false, - isForm: false + label: '供应商代码', + field: 'supplierCode' }, - { - label: '创建者', - field: 'creator', - isTableForm: false, - isForm: false - } -])) - -/** - * @returns {Array} 采购订单或者采购退货单 - */ -export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive([ { label: '订单号', field: 'poNumber' @@ -77,41 +59,16 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive( } }, { - label: '单据类型', - field: 'billType', - dictType: DICT_TYPE.BILL_TYPE, + label: '状态', + field: 'status', + dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS, dictClass: 'string', isTable: true, - isSearch: true, sort: 'custom', table: { width: 150 }, + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } }, { - label: '记录单号', - field: 'recvBillNum', - sort: 'custom', + label: '金额', + field: 'amount', table: { width: 150 }, form: { - // labelMessage: '信息提示说明!!!', + component: 'InputNumber', componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择单号', // 输入框占位文本 - searchField: 'number', // 查询弹窗赋值字段 - searchTitle: '单号信息', // 查询弹窗标题 - searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas, - searchPage: supplierinvoiceRequestMainApi.getNumber, - searchCondition: [{ - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - }, - { - key: 'billType', - value: 'billType', - message: '请填写单据类型!', - isMainValue: true - }] + min: 0, + precision: 6, } }, tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择单号', - searchField: 'number', - searchTitle: '单号信息', - searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas, - searchPage: supplierinvoiceRequestMainApi.getNumber, - searchCondition: [{ - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - }, - { - key: 'billType', - value: 'billType', - message: '请填写单据类型!', - isMainValue: true - }] + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '发货单号', - field: 'asnBillNum', + label: '税率', + field: 'taxRate', + table: { + width: 150 + }, form: { + component: 'InputNumber', componentProps: { - disabled: true + min: 0, + precision: 6, } }, tableForm: { - disabled: true + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '订单号', - field: 'poBillNum', - sort: 'custom', + label: '税额', + field: 'taxAmount', table: { width: 150 }, form: { - component: 'Select', - componentProps:{ - options:[{label:'',value:''}] + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, } }, tableForm: { - type: 'Select', - options:[{label:'',value:''}] + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '调增金额', - field: 'adjustAmount', - sort: 'custom', + label: '税后金额', + field: 'afterTaxAmount', table: { width: 150 }, - isForm:false, - isTable:false, form: { component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } }, { - label: '业务类型', - field: 'businessType', - sort: 'custom', + label: '索赔金额', + field: 'claimAmount', table: { width: 150 }, - isTable:false, - isForm:false, form: { - value: 'SupplierInvoice', + component: 'InputNumber', componentProps: { - disabled: true, + min: 0, + precision: 6, } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, } }, { - label: '申请时间', - field: 'requestTime', + label: '折扣金额', + field: 'discountAmount', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '调整税额', + field: 'adjustingTaxAmount', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + } + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 6, + } + }, + { + label: '金税票号', + field: 'afterTaxAmount', + table: { + width: 150 + }, + }, + { + label: '快递单号', + field: 'expressTrackingNumber', + table: { + width: 150 + }, + }, + { + label: '发票时间', + field: 'invoiceTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -301,19 +295,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( table: { width: 180 }, - isForm:false, form: { component: 'DatePicker', componentProps: { + style: {width:'100%'}, type: 'datetime', dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } }, }, + { - label: '截止时间', - field: 'dueTime', + label: '申请时间', + field: 'requestTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -323,7 +318,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( width: 180 }, isForm:false, - isTable:false, form: { component: 'DatePicker', componentProps: { @@ -356,33 +350,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } } }, - { - label: '状态', - field: 'status', - dictType: DICT_TYPE.REQUEST_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - form: { - value: '1', - componentProps: { - disabled: true - } - } - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, { label: '创建者', field: 'creator', @@ -437,6 +404,15 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( } }, }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, { label: '自动提交', field: 'autoCommit', @@ -444,6 +420,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictClass: 'string', isTable: false, isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -464,7 +442,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isTable: false, - isForm: false, + isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -485,7 +465,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', isTable: false, - isForm: false, + isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -505,8 +487,10 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( field: 'directCreateRecord', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isForm: false, isTable: false, + isForm:false, + isTableForm:false, + isDetail:false, sort: 'custom', table: { width: 150 @@ -566,35 +550,41 @@ export const SupplierinvoiceRequestMainRules = reactive({ * @returns {Array} 供应商发票申请子表 */ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive([ + { + label: '订单号', + field: 'poNumber', + form: { + componentProps: { + disabled: true + } + }, + table: { + width: 150 + }, + tableForm:{ + disabled: true + } + }, { label: '订单行', field: 'poLine', + table: { + width: 150 + }, form: { // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, - searchListPlaceholder: '请选择订单号', - searchField: 'number', - searchTitle: '订单号信息', + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '待开票列表', searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas, searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo, searchCondition: [ { - key: 'recordNumber', - value: 'recvBillNum', - message: '请填写单号!', - isMainValue: true - }, - { - key: 'billType', - value: 'billType', - message: '请填写单号类型!', - isMainValue: true - }, - { - key: 'poNumber', - value: 'poBillNum', - message: '请选择订单号', + key: 'supplierCode', + value: 'supplierCode', + message: '请填供应商信息!', isMainValue: true } ] @@ -602,150 +592,188 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive