diff --git a/src/views/operation/invoiceApply/api.js b/src/views/operation/invoiceApply/api.js index fbb99c20..1da83b61 100644 --- a/src/views/operation/invoiceApply/api.js +++ b/src/views/operation/invoiceApply/api.js @@ -121,4 +121,12 @@ export function Withdraw(parameter) { }) } +export function InvoiceApplicationBizSave(parameter) { + return request({ + url: '/feeApi/InvoiceApplication/BizSave', + method: 'post', + data: parameter, + }) +} + diff --git a/src/views/operation/invoiceApply/columns.tsx b/src/views/operation/invoiceApply/columns.tsx index 6efd8bc4..f50de83f 100644 --- a/src/views/operation/invoiceApply/columns.tsx +++ b/src/views/operation/invoiceApply/columns.tsx @@ -1,8 +1,7 @@ import { ref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' import { getOptions } from '/@/hooks/dict' -import { GetClientListByCode } from '/@/api/common' -import dayjs from 'dayjs' + export const businessTypeList = [ { value: 1, label: '海运出口' }, ] @@ -26,13 +25,7 @@ const FeeRangeList = [ { value: 8, label: '已对账未结算' }, { value: 9, label: '未收未付' }, ] -const CategoryData = [ - { value: 0, label: '普通发票' }, - { value: 1, label: '电子发票' }, - { value: 2, label: '纸质发票' }, -] -const bankList = ref([]) as any -const customerList = ref([]) as any + import { GetControllerClientList,GetCustomerServiceList } from '/@/views/operation/seaexport/api/BookingLedger' @@ -275,297 +268,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: 'customer', - label: '委托单位', - component: 'Input', - show: false, - colProps: { span: 12 }, - }, - { - field: 'customerId', - label: '委托单位', - component: 'Input', - show: false, - colProps: { span: 12 }, - }, - { - label: '委托单位', - field: 'customerName', - required: true, - component: 'ApiSelect', - dynamicDisabled: false, - colProps: { span: 4 }, - componentProps: ({ formModel }) => { - return { - api: GetClientListByCode, - params: { code: 'controller' }, - labelField: 'pinYinCode', - valueField: 'shortName', - showName: 'shortName', - resultField: 'data', - immediate: false, - 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.customerId = obj.id - customerList.value.forEach(item => { - if (item.id == e) { - formModel.customer = item - } - }) - } - if (!obj && !e) { - bankList.value = [] - formModel.customer = {} - formModel.customerId = '' - } - }, - } - }, - }, - { - 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 e2c62014..833d93da 100644 --- a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue +++ b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue @@ -1,55 +1,56 @@