From 5d2b7afac8486da47de518ffad5c4491a6ae85d0 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Tue, 13 Aug 2024 18:22:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=91=E7=A5=A8=E7=94=B3?= =?UTF-8?q?=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bookingcabin/cabinBooking/api.ts | 18 +- src/views/operation/invoiceApply/api.js | 25 ++ src/views/operation/invoiceApply/columns.tsx | 299 --------------- .../invoiceApply/detail/InvoiceDetails.vue | 14 +- .../operation/invoiceApply/detail/index.vue | 1 + src/views/operation/invoiceApply/index.vue | 349 ++++++++++-------- 6 files changed, 235 insertions(+), 471 deletions(-) diff --git a/src/views/bookingcabin/cabinBooking/api.ts b/src/views/bookingcabin/cabinBooking/api.ts index b6e0b066..e770cfe4 100644 --- a/src/views/bookingcabin/cabinBooking/api.ts +++ b/src/views/bookingcabin/cabinBooking/api.ts @@ -4,7 +4,7 @@ import { DataResult, PageRequest } from '/@/api/model/baseModel' export function SearchShipSailingScheduleSpot(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/SearchShipSailingSchedule', + url: '/opApi/SpaceBookingSPOTAPI/SearchShipSailingSchedule', method: 'post', data, }) @@ -36,7 +36,7 @@ export function SearchCommodities(data) { export function mskGetGetInfoSpot(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/GetInfo', + url: '/opApi/SpaceBookingSPOTAPI/GetInfo', method: 'get', params: data, }) @@ -44,7 +44,7 @@ export function mskGetGetInfoSpot(data) { export function mskGetSaveSpot(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/Save', + url: '/opApi/SpaceBookingSPOTAPI/Save', method: 'post', data, }) @@ -84,14 +84,14 @@ export function mskGetGetInfo(data) { export function GetInitInfoMsk() { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/GetInitInfo', + url: '/opApi/SpaceBookingSPOTAPI/GetInitInfo', method: 'get', }) } export function SendMSKBookingSpot(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/SendMSKBooking', + url: '/opApi/SpaceBookingSPOTAPI/SendMSKBooking', method: 'post', data, }) @@ -106,7 +106,7 @@ export function GetInitInfoMskApi() { export function maskCopySPOT(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/BatchCopy', + url: '/opApi/SpaceBookingSPOTAPI/BatchCopy', method: 'post', data, }) @@ -114,7 +114,7 @@ export function maskCopySPOT(data) { export function SearchCommoditiesSpot(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/SearchCommodities', + url: '/opApi/SpaceBookingSPOTAPI/SearchCommodities', method: 'post', data, }) @@ -122,7 +122,7 @@ export function SearchCommoditiesSpot(data) { export function SearchLocationsSpot(data) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/SearchLocations', + url: '/opApi/SpaceBookingSPOTAPI/SearchLocations', method: 'post', data, }) @@ -153,7 +153,7 @@ export function BatchSend(parameter) { export function BatchSendSPOT(parameter) { return request({ - url: '/opApi/SpaceBookingMSKSPOTAPI/BatchSend', + url: '/opApi/SpaceBookingSPOTAPI/BatchSend', method: 'post', data: parameter }) diff --git a/src/views/operation/invoiceApply/api.js b/src/views/operation/invoiceApply/api.js index b373f1e8..77a9761f 100644 --- a/src/views/operation/invoiceApply/api.js +++ b/src/views/operation/invoiceApply/api.js @@ -122,3 +122,28 @@ export function DeleteInvoiceDetail(parameter) { data: parameter, }) } + +export function ApplyAudit(parameter) { + return request({ + url: '/feeApi/InvoiceApplication/ApplyAudit', + method: 'post', + data: parameter, + }) +} + + +export function Withdraw(parameter) { + return request({ + url: '/feeApi/InvoiceApplication/Withdraw', + method: 'post', + data: parameter, + }) +} + +export function InvoiceApplicationBizSave(parameter) { + return request({ + url: '/feeApi/InvoiceApplication/BizSave', + method: 'post', + data: parameter, + }) +} \ No newline at end of file diff --git a/src/views/operation/invoiceApply/columns.tsx b/src/views/operation/invoiceApply/columns.tsx index b14cc79b..6b5394b1 100644 --- a/src/views/operation/invoiceApply/columns.tsx +++ b/src/views/operation/invoiceApply/columns.tsx @@ -264,305 +264,6 @@ export const columns: BasicColumn[] = [ }, ] -export const detailForm: FormSchema[] = [ - { - field: 'id', - label: 'id', - component: 'Input', - show: false, - }, - { - field: 'applicationNO', - label: '申请单号', - component: 'Input', - dynamicDisabled: true, - colProps: { span: 4 }, - }, - { - field: 'statusText', - label: '状态', - component: 'Input', - dynamicDisabled: true, - colProps: { span: 4 }, - }, - { - field: 'createByName', - label: '申请人', - component: 'Input', - dynamicDisabled: true, - colProps: { span: 4 }, - }, - { - field: 'applyDate', - label: '申请开票日期', - component: 'DatePicker', - colProps: { span: 4 }, - defaultValue: dayjs().format('YYYY-MM-DD'), - componentProps: { - valueFormat: 'YYYY-MM-DD', - format: 'YYYY-MM-DD', - }, - }, - { - field: 'invoiceNO', - label: '发票号', - component: 'Input', - colProps: { span: 4 }, - }, - { - field: 'AcutalInvoiceNO', - label: '实际发票号', - dynamicDisabled: true, - component: 'Input', - colProps: { span: 4 }, - }, - { - field: 'invoiceHeader', - label: '发票抬头', - component: 'Input', - colProps: { span: 12 }, - }, - { - field: 'taxID', - label: '纳税人识别号', - component: 'Input', - colProps: { span: 12 }, - }, - { - field: 'customerAddTel', - label: '地址电话', - component: 'Input', - colProps: { span: 12 }, - }, - { - field: 'customerBank', - label: '开户行及账号', - component: 'Input', - show: false, - colProps: { span: 12 }, - }, - { - field: 'customerBankId', - label: '开户行及账号', - colProps: { span: 12 }, - component: 'Select', - componentProps: ({ formModel }) => { - return { - options: bankList.value, - fieldNames: { - label: 'name', - value: 'id', - }, - onChange: (e, obj) => { - if (obj) { - bankList.value.forEach(item => { - if (item.id == e) { - formModel.customerBank = item - } - }) - } - if (!obj && !e) { - formModel.customerBank = {} - } - }, - } - }, - }, - { - field: 'currency', - label: '币别', - defaultValue: 'CNY', - component: 'ApiSelect', - colProps: { span: 4 }, - componentProps: () => { - return { - api: GetFeeCurrencySelectList, - labelField: 'name', - valueField: 'codeName', - resultField: 'data', - } - }, - }, - { - field: 'category', - label: '申请类型', - component: 'Select', - colProps: { span: 4 }, - componentProps: { - options: CategoryData, - }, - }, - { - field: 'invoiceCurrency', - label: '发票币别', - defaultValue: 'CNY', - component: 'ApiSelect', - colProps: { span: 4 }, - componentProps: () => { - return { - api: GetFeeCurrencySelectList, - labelField: 'name', - valueField: 'codeName', - resultField: 'data', - } - }, - }, - { - field: 'customerName', - label: '委托单位', - component: 'Input', - show: false, - colProps: { span: 12 }, - }, - { - field: 'customer', - label: '委托单位', - component: 'Input', - show: false, - colProps: { span: 12 }, - }, - { - label: '委托单位', - field: 'customerId', - required: true, - component: 'ApiSelect', - dynamicDisabled: false, - colProps: { span: 4 }, - componentProps: ({ formModel }) => { - return { - allowClear: true, - showSearch: true, - api: () => { - return new Promise((resolve) => { - const arr = getOptions('controller') - resolve(arr) - }) - }, - labelField: 'name', - valueField: 'id', - showName: 'shortName', - resultField: 'data', - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { - if (obj) { - const queryStr = [{ - FieldName: 'ClientId', - FieldValue: obj.id, - ConditionalType: '0' - }] - const data = { - pageCondition: { - "pageIndex": 1, - "pageSize": 20, - "sortConditions": [] - }, - queryCondition: JSON.stringify(queryStr) - } - GetClientBankList(data).then(res => { - res.data.forEach(item => { - item.name = item.bankName + ' ' + item.bankAgentName - }) - bankList.value = res.data - }) - formModel.customerName = obj.label - customerList.value.forEach(item => { - if (item.id == e) { - formModel.customer = item - } - }) - } - if (!obj && !e) { - bankList.value = [] - formModel.customer = {} - formModel.customerName = '' - } - }, - } - }, - }, - { - label: '代开客户', - field: 'autualCustomerName', - component: 'ApiSelect', - required: false, - dynamicDisabled: false, - colProps: { span: 4 }, - componentProps: () => { - return { - api: () => { - return new Promise((resolve) => { - GetControllerClientList().then((res) => { - resolve(res) - }) - }) - }, - immediate: false, - labelField: 'shortName', - valueField: 'shortName', - resultField: 'data', - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - } - }, - }, - { - field: 'applyAmount', - label: '申请金额', - component: 'InputNumber', - colProps: { span: 4 }, - }, - { - field: 'invoiceAmount', - label: '开票金额', - component: 'InputNumber', - colProps: { span: 4 }, - }, - { - field: 'taxRate', - label: '开票税率', - component: 'InputNumber', - colProps: { span: 4 }, - }, - { - field: 'otherCurrencyAmount', - label: '外币金额', - component: 'InputNumber', - colProps: { span: 4 }, - }, - { - field: 'saleDeptId', - label: '所属分部', - component: 'ApiSelect', - colProps: { span: 4 }, - componentProps: () => { - return { - api: GetOrgList, - resultField: 'data', - } - }, - }, - { - field: 'note', - label: '', - component: 'InputTextArea', - colProps: { span: 12 }, - slot: 'note', - }, - { - field: 'invoiceRemark', - label: '开票要求', - component: 'InputTextArea', - colProps: { span: 12 }, - componentProps: () => { - return { - autoSize: { minRows: 4, maxRows: 7 } - } - }, - }, -] export const detailColumns: BasicColumn[] = [ { diff --git a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue index 36f99a4a..ea555232 100644 --- a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue +++ b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue @@ -62,6 +62,8 @@ import { ref, defineExpose, unref } from 'vue' import { BasicTable, useTable, TableAction } from '/@/components/Table' import { detailColumns, detailSearchFormSchema, businessTypeList } from '../columns' import { GetBizList, InvoiceApplicationGetFees, InvoiceApplicationSave } from '../api.js' +import { useMessage } from '/@/hooks/web/useMessage' +const { createMessage } = useMessage() const open = ref(false) const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, getRawDataSource }] = useTable({ @@ -227,7 +229,17 @@ function onSelectChangeDetail(selectedRowKeys) { selectedRowKeysDetial.value = selectedRowKeys } function addDetailed() { - getSelectRows() + const arr = getSelectRows() ? getSelectRows() : [] + const arr1 = [] + arr.forEach(item=>{ + if(item.customerId!=customerIdP.value){ + arr1.push(1) + } + }) + if(arr1.length>0){ + createMessage.error('请选择同一客户') + return false + } } const customerIdP = ref('') function changeCustIn(id) { diff --git a/src/views/operation/invoiceApply/detail/index.vue b/src/views/operation/invoiceApply/detail/index.vue index d97b183d..0ed32101 100644 --- a/src/views/operation/invoiceApply/detail/index.vue +++ b/src/views/operation/invoiceApply/detail/index.vue @@ -264,6 +264,7 @@ const detailForm = [ formModel.customer = item } }) + feeTableRef.value.changeCust(obj.id) } if (!obj && !e) { bankList.value = [] diff --git a/src/views/operation/invoiceApply/index.vue b/src/views/operation/invoiceApply/index.vue index 9b83a987..5efa24d5 100644 --- a/src/views/operation/invoiceApply/index.vue +++ b/src/views/operation/invoiceApply/index.vue @@ -1,15 +1,10 @@