更新各种问题

szh-new
sunzehua 3 months ago
parent a2b1a886c7
commit 46173ac739

@ -66,7 +66,7 @@
</template>
</a-modal>
<slot></slot>
<DsFileList :id="id" ref="dsFileList" :height="height"></DsFileList>
<DsFileList v-if="showFileList" :id="id" ref="dsFileList" :height="height"></DsFileList>
</div>
</template>
@ -93,6 +93,11 @@
show: {
type: Boolean,
default: true,
},
//
showFileList: {
type: Boolean,
default: true,
},
//
height: {
@ -174,6 +179,7 @@
const fileForm = ref(null)
//
const dsFileList = ref(null)
const emits = defineEmits(['handleSuccess'])
//
const handleOk = async () => {
const res = await fileForm.value.validateFields()
@ -192,10 +198,15 @@
loading.value = false
visible.value = false
upFileList.value = []
dsFileList.value.init()
if(props.showFileList){
dsFileList.value.init()
} else {
emits('handleSuccess')
}
createMessage.success('上传成功!')
})
.catch(() => {
.catch((res) => {
console.log(res)
loading.value = false
createMessage.error('上传失败!')
})

@ -4,6 +4,7 @@ import { useOptionsStore } from '/@/store/modules/options'
import { SlotFlags } from '@vue/shared'
import { getOptions } from '/@/hooks/dict'
import { BookingLabelList } from './api'
import { GetClientListByCode } from '/@/api/common'
const optionsStore = useOptionsStore()
import {
GetCarrierlist,
@ -162,15 +163,13 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'carrier' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {},
immediate: false,
}
},
},
@ -836,8 +835,8 @@ export const detialForm: FormSchema[] = [
colProps: { span: 4 },
},
{
label: '船公司名称',
field: 'carrier',
label: '船公司id',
field: 'carrierId',
component: 'Input',
defaultValue: null,
show: false,
@ -850,23 +849,32 @@ export const detialForm: FormSchema[] = [
show: false,
},
{
field: 'carrierId',
field: 'carrier',
label: '船公司',
labelSlot: 'carrierId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'carrier' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {},
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.carrierId = obj.id
formModel.carrierCode = obj.codeName
}
if (!e && !obj) {
formModel.carrierId = ''
formModel.carrierCode = ''
}
}
}
},
},

@ -7,34 +7,34 @@
<span class="iconfont icon-jiahao2fill"></span>
保存
</a-button>
<!-- <a-button v-if="type === 'Edit'" style="margin: 0 10px;" type="link" size="mini">
<!-- <a-button v-if="type === 'edit'" style="margin: 0 10px;" type="link" size="mini">
<span class="iconfont icon-tijiao1"></span>
提交
</a-button>
<a-button v-if="type === 'Edit'" type="link" size="mini">
<a-button v-if="type === 'edit'" type="link" size="mini">
<span class="iconfont icon-fuzhi3"></span>
审核
</a-button>
<a-button v-if="type === 'Edit'" style="margin: 0 10px;" type="link" size="mini">
<a-button v-if="type === 'edit'" style="margin: 0 10px;" type="link" size="mini">
<span class="iconfont icon-guanli"></span>提交审核</a-button> -->
</div>
<a-spin :spinning="loading">
<a-form :model="form" :wrapper-col="{ span: 21 }">
<div v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"
<div v-if="type === 'edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"
class="bookslot">
<div class="box-item">
<div class="title"
v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0">
v-if="type === 'edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0">
关联订舱
</div>
<div :class="{ 'line-bootm': index != form.bookingSlotSaleInfoList.length - 1 }"
v-for="(item, index) in form.bookingSlotSaleInfoList" v-show="item.customerid != 0"
v-for="(item, index) in form.bookingSlotSaleInfoList" v-show="item.customerId != 0"
:key="index">
<a-row>
<a-col :span="4">
<a-form-item label="">
<div>委托单位</div>
<a-select show-search v-model:value="item.customerid"
<a-select show-search v-model:value="item.customerId"
:default-active-first-option="false" :show-arrow="false"
:filter-option="false" :not-found-content="null"
@search="SearchCustomer">
@ -48,7 +48,7 @@
<a-col :span="4">
<a-form-item label="">
<div>客服</div>
<a-select show-search v-model:value="item.custserviceid"
<a-select show-search v-model:value="item.custServiceId"
:default-active-first-option="false" :show-arrow="false"
:filter-option="false" :not-found-content="null" allowClear
@search="SearchUser($event, 0)" @change="e => {
@ -57,7 +57,7 @@
">
<a-select-option v-for="item1 in UserListCus" :key="item1.id"
:value="item1.id">
{{ item1.userName }}
{{ item1.pinYinCode }}
</a-select-option>
</a-select>
</a-form-item>
@ -65,7 +65,7 @@
<a-col :span="4">
<a-form-item label="">
<div>销售</div>
<a-select show-search v-model:value="item.saleid"
<a-select show-search v-model:value="item.saleId"
:default-active-first-option="false" :show-arrow="false"
:filter-option="false" :not-found-content="null" allowClear
@search="SearchUser($event, 1)" @change="e => {
@ -74,7 +74,7 @@
">
<a-select-option v-for="item1 in UserListSale" :key="item1.id"
:value="item1.id">
{{ item1.userName }}
{{ item1.pinYinCode }}
</a-select-option>
</a-select>
</a-form-item>
@ -82,7 +82,7 @@
<a-col :span="4">
<a-form-item label="">
<div>操作</div>
<a-select show-search v-model:value="item.opid"
<a-select show-search v-model:value="item.opId"
:default-active-first-option="false" :show-arrow="false" allowClear
:filter-option="false" :not-found-content="null"
@search="SearchUser($event, 2)" @change="e => {
@ -91,7 +91,7 @@
">
<a-select-option v-for="item in UserListOp" :key="item.id"
:value="item.id">
{{ item.userName }}
{{ item.pinYinCode }}
</a-select-option>
</a-select>
</a-form-item>
@ -99,7 +99,7 @@
<a-col :span="4">
<a-form-item label="">
<div>单证</div>
<a-select show-search v-model:value="item.docid" allowClear
<a-select show-search v-model:value="item.docId" allowClear
:default-active-first-option="false" :show-arrow="false"
:filter-option="false" :not-found-content="null"
@search="SearchUser($event, 3)" @change="e => {
@ -108,7 +108,7 @@
">
<a-select-option v-for="item in UserListDoc" :key="item.id"
:value="item.id">
{{ item.userName }}
{{ item.pinYinCode }}
</a-select-option>
</a-select>
</a-form-item>
@ -116,7 +116,7 @@
<a-col :span="4">
<a-form-item label="">
<div>商务</div>
<a-select show-search v-model:value="item.businessid" allowClear
<a-select show-search v-model:value="item.businessId" allowClear
:default-active-first-option="false" :show-arrow="false"
:filter-option="false" :not-found-content="null"
@search="SearchUser($event, 4)" @change="e => {
@ -125,7 +125,7 @@
">
<a-select-option v-for="item in UserListBus" :key="item.id"
:value="item.id">
{{ item.userName }}
{{ item.pinYinCode }}
</a-select-option>
</a-select>
</a-form-item>
@ -135,20 +135,20 @@
<a-col :span="4">
<a-form-item label="">
<div>品名</div>
<a-input v-model:value="item.goodsname" />
<a-input v-model:value="item.goodsName" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="">
<div>卖价</div>
<a-input-number style="width: 100%" :precision="2"
v-model:value="item.sellinG_PRICE" />
v-model:value="item.sellingPrice" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="">
<div>销售日期</div>
<a-date-picker style="width: 100%" v-model:value="item.salE_TIME" />
<a-date-picker valueFormat="YYYY-MM-DD" style="width: 100%" v-model:value="item.saleTime" />
</a-form-item>
</a-col>
<a-col :span="4">
@ -165,7 +165,7 @@
<div class="box-item">
<div class="title">
<span style="margin-right: 20px;">{{ type === 'Edit' ? '舱位修改' : '舱位新增' }}</span>
<span style="margin-right: 20px;">{{ type === 'edit' ? '舱位修改' : '舱位新增' }}</span>
<span style="background: #d78a6d;color: white;padding: 0 8px;font-size: 13px;font-weight: 400;"
v-if="form.spliT_OR_MERGE_FLAG == 1">已拆票</span>
<span style="background: #d78a6d;color: white;padding: 0 8px;font-size: 13px;font-weight: 400;"
@ -247,10 +247,8 @@
</template>
<script lang="ts" setup>
import { AutoComplete } from 'ant-design-vue'
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
import { GetCtnSelectList } from '/@/api/common'
import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
import DsFile from '/@/components/File/index.vue'
import { ref, reactive, onMounted, watch } from 'vue'
import {
@ -258,7 +256,7 @@ import {
BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile
} from '../api'
import {
GetControllerClientList,
GetControllerClientList,GetCustomerServiceList,GetSaleList,GetVouchingClerkList
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
import { SlotFlags } from '@vue/shared'
@ -439,7 +437,7 @@ const { createMessage } = useMessage()
const type = ref('')
const form = ref({
logList: [],
bookingSlotSaleInfoList:[]
bookingSlotSaleInfoList: []
}) as any
const boxList = ref([]) as any
const CustomerList = ref([]) as any
@ -511,24 +509,7 @@ function init() {
boxList.value = res.data
})
}
// optionsStore.getOptionsByCodeAsync('GetSaleUserList').then(res => {
// UserListBus.value = res
// })
// optionsStore.getOptionsByCodeAsync('GetSaleUserList').then(res => {
// UserListSale.value = res
// })
// optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
// UserListOp.value = res
// })
// optionsStore.getOptionsByCodeAsync('GetVouchingClerkList').then(res => {
// UserListDoc.value = res
// })
// optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
// UserListCus.value = res
// })
// GetControllerClientList().then(res => {
// CustomerList.value = res.data
// })
}
function handleSearch(e) {
fetching.value = true
@ -538,8 +519,8 @@ function handleSearch(e) {
})
}
function SearchCustomer(e) {
DjyCustomerSuggest({ keyword: e }).then(res => {
CustomerList.value = res.data.rows
GetClientListByCode({ queryKey: e, code: 'controller' }).then(res => {
CustomerList.value = res.data
})
}
const dsFile = ref(null) as any
@ -563,23 +544,31 @@ function handlePageChange() {
}
function SearchUser(e, type) {
if (e) {
GetSysUserPage({ name: e }).then(res => {
if (type === 0) {
if (type === 0) {
GetCustomerServiceList({queryKey:e}).then(res=>{
UserListCus.value = res.data
}
if (type === 1) {
})
}
if (type === 1) {
GetSaleList({queryKey:e}).then(res=>{
UserListSale.value = res.data
}
if (type === 2) {
})
}
if (type === 2) {
GetCustomerServiceList({queryKey:e}).then(res=>{
UserListOp.value = res.data
}
if (type === 3) {
})
}
if (type === 3) {
GetVouchingClerkList({queryKey:e}).then(res=>{
UserListDoc.value = res.data
}
if (type === 4) {
})
}
if (type === 4) {
GetSaleList({queryKey:e}).then(res=>{
UserListBus.value = res.data
}
})
})
}
}
}
function getDetail() {
@ -595,36 +584,39 @@ function getDetail() {
})
boxList.value = res.data
boxList.value.forEach(item => {
item.flag = false
form.value.ctnList.forEach(ite => {
if (ite.ctnCode === item.ediCode) {
item.flag = true
}
item.flag = false
form.value.ctnList.forEach(ite => {
if (ite.ctnCode === item.ediCode) {
item.flag = true
}
})
})
})
})
if (form.value.bookingSlotSaleInfoList) {
form.value.bookingSlotSaleInfoList.forEach(item => {
if (item.custserviceid) {
item.custserviceid = Number(item.custserviceid)
}
if (item.docid) {
item.docid = Number(item.docid)
}
if (item.opid) {
item.opid = Number(item.opid)
}
if (item.saleid) {
item.saleid = Number(item.saleid)
}
if (item.businessid) {
item.businessid = Number(item.businessid)
}
})
oldBook.value = JSON.parse(JSON.stringify(form.value.bookingSlotSaleInfoList))
} else {
form.value.bookingSlotSaleInfoList = []
}
if (form.value.bookingSlotSaleInfoList.length > 0) {
optionsStore.getOptionsByCodeAsync('GetSaleList').then(res => {
UserListBus.value = res
})
optionsStore.getOptionsByCodeAsync('GetSaleList').then(res => {
UserListSale.value = res
})
optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
UserListOp.value = res
})
optionsStore.getOptionsByCodeAsync('GetVouchingClerkList').then(res => {
UserListDoc.value = res
})
optionsStore.getOptionsByCodeAsync('GetCustomerServiceList').then(res => {
UserListCus.value = res
})
GetControllerClientList().then(res => {
CustomerList.value = res.data
})
}
} else {
createMessage.error(res.message)
}
@ -748,7 +740,7 @@ async function handleSave() {
const data = {
...values,
...valuesT,
ctnList:form.value.ctnList,
ctnList: form.value.ctnList,
bookingSlotSaleInfoList: form.value.bookingSlotSaleInfoList
}
data.ctnStat = boxTotal.value
@ -757,26 +749,9 @@ async function handleSave() {
BookingSlotSave(data).then(res => {
if (res.succeeded) {
createMessage.success('保存成功')
type.value = 'Edit'
type.value = 'edit'
id.value = res.data.id
form.value = res.data
form.value.bookingSlotSaleInfoList.forEach(item => {
if (item.custserviceid) {
item.custserviceid = Number(item.custserviceid)
}
if (item.docid) {
item.docid = Number(item.docid)
}
if (item.opid) {
item.opid = Number(item.opid)
}
if (item.saleid) {
item.saleid = Number(item.saleid)
}
if (item.businessid) {
item.businessid = Number(item.businessid)
}
})
loading.value = false
} else {
createMessage.error(res.message)

@ -57,7 +57,7 @@
<BulbFilled style="color: green; font-size: 16px" :title="record.lstRecvBCDate" v-if="record.isRecvBC" />
</template>
<template v-if="column.dataIndex == 'labelList'">
<div>
<div @click="handleLabelBind(record)" style="min-width: 200px;min-height: 15px">
<a-tag style="color: black !important;font-weight: bold;cursor: pointer;" :color="item.color"
@click="handleLabelBind(record)" v-for="(item, index) in record.labelList" :key="index">{{ item.name
}}</a-tag>
@ -197,6 +197,9 @@ const generation = ref('')
function handleOpenSlot(row) {
openModal(true, { type: 'cabin', row: row })
}
function handleRowclick(record, index, event) {
console.log(record, index, event)
}
function handledbclick(record) {
go(`/CabinManagementDetail?type=edit&id=${record.id}`)
}
@ -254,6 +257,7 @@ function handleDeleteAll() {
setLoading(false);
})
}
function handleLabelBind(row) {
visible.value = true
labelIdArray.value = []
@ -290,7 +294,7 @@ function handleAdd() {
go(`/CabinManagementDetail?type=Add`)
}
function handleEdit(row) {
go(`/CabinManagementDetail?type=Edit&id=${row.id}`)
go(`/CabinManagementDetail?type=edit&id=${row.id}`)
}
const moreNumVal = ref(0)
const moreMlbnoFlag = ref(false)

@ -5,6 +5,7 @@ import {
GetClientLanesSelectList,
GetClientPortSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { GetClientListByCode } from '/@/api/common'
// 字典
import { getDictOption } from '/@/utils/dictUtil'
import { getOptions } from '/@/hooks/dict'
@ -43,14 +44,13 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 5 },
componentProps: () => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'carrier' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
}
},
},
@ -131,43 +131,46 @@ export const formSchema: FormSchema[] = [
colProps: { span: 6 },
},
{
label: '船公司名称',
field: 'carrier',
label: '船公司id',
field: 'carrierId',
component: 'Input',
defaultValue: null,
show: false,
},
{
label: '船公司代码',
field: 'carrierCode',
defaultValue: null,
component: 'Input',
show: false,
},
{
field: 'carrierId',
field: 'carrier',
label: '船公司',
labelSlot: 'carrierId',
component: 'ApiSelect',
rules: [{ required: true, message: '请填写船公司' }],
colProps: { span: 6 },
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'carrier' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.carrier = obj.label
if (e && obj) {
formModel.carrierId = obj.id
formModel.carrierCode = obj.codeName
}
if (!obj && !e) {
formModel.carrier = ''
if (!e && !obj) {
formModel.carrierId = ''
formModel.carrierCode = ''
}
},
}
}
},
},

@ -4,7 +4,7 @@ import { DataResult, PageRequest } from '/@/api/model/baseModel'
export function SearchShipSailingScheduleSpot(data) {
return request<DataResult>({
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<DataResult>({
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<DataResult>({
url: '/opApi/SpaceBookingMSKSPOTAPI/Save',
url: '/opApi/SpaceBookingSPOTAPI/Save',
method: 'post',
data,
})
@ -84,14 +84,14 @@ export function mskGetGetInfo(data) {
export function GetInitInfoMsk() {
return request<DataResult>({
url: '/opApi/SpaceBookingMSKSPOTAPI/GetInitInfo',
url: '/opApi/SpaceBookingSPOTAPI/GetInitInfo',
method: 'get',
})
}
export function SendMSKBookingSpot(data) {
return request<DataResult>({
url: '/opApi/SpaceBookingMSKSPOTAPI/SendMSKBooking',
url: '/opApi/SpaceBookingSPOTAPI/SendMSKBooking',
method: 'post',
data,
})
@ -106,7 +106,7 @@ export function GetInitInfoMskApi() {
export function maskCopySPOT(data) {
return request<DataResult>({
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<DataResult>({
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<DataResult>({
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<DataResult>({
url: '/opApi/SpaceBookingMSKSPOTAPI/BatchSend',
url: '/opApi/SpaceBookingSPOTAPI/BatchSend',
method: 'post',
data: parameter
})

@ -6,6 +6,7 @@ import {
} from '/@/views/operation/seaexport/api/BookingLedger'
// 字典
import { getDictOption } from '/@/utils/dictUtil'
import { GetClientListByCode } from '/@/api/common'
const FnblType = ref([])
const FncargoId = ref([])
getDictOption('bl_type').then(res => {
@ -229,14 +230,13 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'carrier' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
}
},
},

@ -58,8 +58,9 @@ import { useMessage } from '/@/hooks/web/useMessage'
import { getOptions } from '/@/hooks/dict'
const { createMessage } = useMessage()
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetControllerClientList, GetSaleUserList, GetCustomerServiceList, GetVouchingClerkList } from '/@/views/operation/seaexport/api/BookingLedger'
import { GetControllerClientList, GetSaleUserList, GetCustomerServiceList, GetVouchingClerkList,GetSaleList } from '/@/views/operation/seaexport/api/BookingLedger'
import { GetClientInfoWithContact } from './api'
import { GetClientListByCode } from '/@/api/common'
import dayjs from 'dayjs';
const customerContactAllList = ref([]) //
const formSchema: FormSchema[] = [
@ -122,34 +123,32 @@ const formSchema: FormSchema[] = [
colProps: { span: 24 },
},
{
label: '委托单位',
label: '委托单位id',
field: 'customerId',
component: 'Input',
show: false,
},
{
label: '委托单位',
field: 'customerName',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('controller')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
api: GetClientListByCode,
params: { code: 'controller' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.customerName = obj.label
formModel.customerId = obj.id
const data = {
"clientId": obj.value,
"clientId": obj.id,
"isController": true
}
GetClientInfoWithContact(data).then(res => {
@ -167,9 +166,10 @@ const formSchema: FormSchema[] = [
formModel.custserviceId = res.data.customerService
}
})
}
if (!obj && !e) {
formModel.customerName = ''
formModel.customerId = ''
}
},
}
@ -213,24 +213,26 @@ const formSchema: FormSchema[] = [
},
{
label: '销售',
field: 'saleId',
field: 'saleName',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetSaleUserList,
labelField: 'userName',
valueField: 'id',
api: GetSaleList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.saleName = obj.label
console.log(obj)
formModel.saleId = obj.id
}
if (!obj && !e) {
formModel.saleName = ''
formModel.saleId = ''
}
},
}
@ -238,25 +240,26 @@ const formSchema: FormSchema[] = [
},
{
label: '操作',
field: 'operatorId',
field: 'opName',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetSaleUserList,
labelField: 'userName',
valueField: 'id',
api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.opName = obj.label
formModel.operatorId = obj.id
}
if (!obj && !e) {
formModel.opName = ''
formModel.operatorId = ''
}
},
}
@ -264,25 +267,26 @@ const formSchema: FormSchema[] = [
},
{
label: '单证',
field: 'docId',
field: 'docName',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetVouchingClerkList,
labelField: 'userName',
valueField: 'id',
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.docName = obj.label
formModel.docId = obj.id
}
if (!obj && !e) {
formModel.docName = ''
formModel.docId = ''
}
},
}
@ -290,25 +294,26 @@ const formSchema: FormSchema[] = [
},
{
label: '客服',
field: 'custserviceId',
field: 'custserviceName',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetCustomerServiceList,
labelField: 'userName',
valueField: 'id',
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.custserviceName = obj.label
formModel.custserviceId = obj.id
}
if (!obj && !e) {
formModel.custserviceName = ''
formModel.custserviceId = ''
}
},
}
@ -316,25 +321,26 @@ const formSchema: FormSchema[] = [
},
{
label: '商务',
field: 'businessid',
field: 'business',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetSaleUserList,
labelField: 'userName',
valueField: 'id',
api: GetSaleList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.business = obj.label
formModel.businessid = obj.id
}
if (!obj && !e) {
formModel.business = ''
formModel.businessid = ''
}
},
}
@ -342,25 +348,26 @@ const formSchema: FormSchema[] = [
},
{
label: '航线操作',
field: 'routeID',
field: 'route',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetSaleUserList,
labelField: 'userName',
valueField: 'id',
api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.route = obj.label
formModel.routeID = obj.id
}
if (!obj && !e) {
formModel.route = ''
formModel.routeID = ''
}
},
}
@ -368,25 +375,26 @@ const formSchema: FormSchema[] = [
},
{
label: '航线管理',
field: 'lineManageID',
field: 'lineManage',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetSaleUserList,
labelField: 'userName',
valueField: 'id',
api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.lineManage = obj.label
formModel.lineManageID = obj.id
}
if (!obj && !e) {
formModel.lineManage = ''
formModel.lineManageID = ''
}
},
}

@ -104,6 +104,25 @@ export function InvoiceApplicationDelete(parameter) {
})
}
export function GeneralInvoiceDeleteDetail(parameter) {
return request({
url: '/feeApi/GeneralInvoice/DeleteDetail',
method: 'post',
data: parameter,
})
}
export function DeleteInvoiceDetail(parameter) {
return request({
url: '/feeApi/GeneralInvoice/DeleteInvoiceDetail',
method: 'post',
data: parameter,
})
}
export function ApplyAudit(parameter) {
return request({
url: '/feeApi/InvoiceApplication/ApplyAudit',
@ -129,4 +148,19 @@ export function InvoiceApplicationBizSave(parameter) {
})
}
export function GetOpFileList(parameter) {
return request({
url: '/mainApi/OpFile/GetOpFileList',
method: 'get',
params:parameter
})
}
export function DownloadOpFile(params) {
return request({
url: '/mainApi/OpFile/DownloadOpFileInfo',
responseType: 'blob',
method: 'get',
params
})
}

@ -1,7 +1,7 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { getOptions } from '/@/hooks/dict'
import dayjs from 'dayjs'
export const businessTypeList = [
{ value: 1, label: '海运出口' },
]
@ -25,13 +25,19 @@ 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'
import { GetClientBankList, GetOrgList } from './api'
import { GetFeeCurrencySelectList,GetFeeCodeSelectList } from '/@/api/common'
import { GetFeeCurrencySelectList,GetFeeCodeSelectList,GetClientListByCode } from '/@/api/common'
export const searchFormSchema: FormSchema[] = [
{
field: 'applicationNO',
@ -48,23 +54,13 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
GetControllerClientList().then((res) => {
res.data.forEach((item) => {
if (item.codeName) item.shortName = item.codeName + '/' + item.shortName
})
resolve(res)
})
})
},
immediate: false,
labelField: 'shortName',
valueField: 'codeName',
api: GetClientListByCode,
params: { code: 'controller' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
}
},
},

@ -1,46 +1,49 @@
<template>
<a-modal width="1400px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
<div style="padding-bottom: 20px;" >
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable" @row-dbClick="(e) => {
GoDetailed(true, e)
}
">
<template #tableTitle>
<a-button v-repeat type="link" @click="GoDetailed(false, null)">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
<div style="padding-bottom:20px ;" >
<div>
<BasicTable maxHeight="500" class="ds-table" @row-click="handleClick" @register="registerTable"
@row-dbClick="(e) => {
GoDetailed(true, e)
}
">
<template #tableTitle>
<a-button v-repeat type="link" @click="addDetailed()">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
</template>
</template>
<template #footer>
<div class="total">
<span style="margin-right: 10px;">合计:</span>
<span class="total-item">
<span class="text">RMB未开:</span>
<span class="number">{{ rmbTotal }}</span>
</span>
<span class="total-item">
<span class="text">USD未开:</span>
<span class="number">{{ usdTotal }}</span>
</span>
<span class="total-item">
<span class="text">其他未开:</span>
<span class="number">{{ otherTotal }}</span>
</span>
</div>
</template>
</BasicTable>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
</template>
<template #footer>
<div class="total">
<span style="margin-right: 10px;">合计:</span>
<span class="total-item">
<span class="text">RMB未开:</span>
<span class="number">{{ rmbTotal }}</span>
</span>
<span class="total-item">
<span class="text">USD未开:</span>
<span class="number">{{ usdTotal }}</span>
</span>
<span class="total-item">
<span class="text">其他未开:</span>
<span class="number">{{ otherTotal }}</span>
</span>
</div>
</template>
</BasicTable>
</div>
<div>
<a-button type="link" @click="handleAddDetial">
<span class="iconfont icon-jia"></span>
添加
</a-button>
</div>
<a-table :pagination="false" rowKey="recordId"
<a-table rowKey="recordId" :pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeysDetial, onChange: onSelectChangeDetail }"
:loading="loading" :columns="columns" :data-source="dataSource" bordered>
<template v-slot:bodyCell="{ column, record }">
@ -59,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({
@ -177,6 +182,11 @@ function init() {
onChange: onSelectChange
},
})
if (customerIdP.value) {
getForm().setFieldsValue({
customerId: customerIdP.value
})
}
}, 500)
}
const rmbTotal = ref(0)
@ -212,14 +222,31 @@ function handleAddDetial() {
item.originalAmount = item.applyAmount
item.originalProcessedAmount = item.processedAmount ? item.processedAmount : 0
})
open.value = false
emits('updateList', arr)
}
const selectedRowKeysDetial = ref([]) as any
function onSelectChangeDetail(selectedRowKeys) {
selectedRowKeysDetial.value = selectedRowKeys
}
defineExpose({ init })
function addDetailed() {
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) {
customerIdP.value = id
}
defineExpose({ init, changeCustIn })
</script>
<style lang="less" scoped>
.total {

@ -11,34 +11,70 @@
<a-tab-pane key="1" tab="发票明细">
<a-button type="link" @click="add">
<span class="iconfont icon-jia"></span>
新增
添加发票明细
</a-button>
<a-popconfirm title="确定要删除勾选的数据?" ok-text="" cancel-text="" @confirm="deleteRow">
<a-button type="link">
<a-button style="margin: 0 10px;" type="link">
<span class="iconfont icon-shanchu1"></span>
删除
删除发票明细
</a-button>
</a-popconfirm>
<a-button type="link" @click="open">
<span class="iconfont icon-jia"></span>
发票明细
<span class="iconfont icon-liebiao"></span>
引入发票明细
</a-button>
</a-tab-pane>
<a-tab-pane key="2" tab="费用明细">
<a-button type="link" @click="add">
<span class="iconfont icon-jia"></span>
删除
</a-button>
<a-popconfirm title="确定要删除勾选的数据?" ok-text="" cancel-text="" @confirm="delFee">
<a-button type="link">
<span class="iconfont icon-shanchu1"></span>
删除申请明细
</a-button>
</a-popconfirm>
</a-tab-pane>
<a-tab-pane key="3" tab="附件上传">
<div style="display: flex;">
<DsFile @handleSuccess="fileSuccess" ref="dsFile" :showFileList="false" :id="props.id" :show="false"
height="300">
<a-button type="link" @click="addFile">
<span class="iconfont icon-jia"></span>
附件上传
</a-button>
</DsFile>
<a-button type="link">
<span class="iconfont icon-shanchu1"></span>
删除文件
</a-button>
</div>
</a-tab-pane>
</a-tabs>
</div>
<div>
<div v-if="activeKey == '1'">
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" />
<hot-table ref="hotTb" :data="list" :settings="settings">
</hot-table>
</div>
<div class="total">
<div v-if="activeKey == '2'">
<a-table size="small" :pagination="false" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeysDetial, onChange: onSelectChangeDetail }"
:columns="columnsData" :data-source="dataSource" bordered>
</a-table>
</div>
<div v-if="activeKey == '3'">
<a-table :loading="fileloading" size="small" :pagination="false" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeysFile, onChange: onSelectChangeFile }" :columns="columnsFile"
:data-source="fileData" bordered>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'fileName'">
<a @click="download(record)">{{ record.fileName }}</a>
</template>
<template v-if="column.dataIndex == 'caozuo'">
<a @click="lookFile(record)"></a>
</template>
</template>
</a-table>
</div>
<div class="total" v-if="activeKey == '1'">
合计
<span class="total-item">
数量: <span class="num">{{ list.length }}</span>
@ -55,6 +91,10 @@
</div>
</div>
<InvoiceDetails @updateList="updateList" ref="InvoiceDetailsRef"></InvoiceDetails>
<a-modal width="800px" @cancel="fileFlag = false" :visible="fileFlag" title="预览文件" :footer="null">
<img v-if="!pdfFlag" :src="fileSrc" alt="">
<iframe v-if="pdfFlag" :src="fileSrc" style="height: 800px;width: 100%;" frameborder="0"></iframe>
</a-modal>
</a-spin>
</template>
<script lang="ts" setup>
@ -64,21 +104,18 @@ import {
ref,
watch,
watchEffect,
computed,
unref,
defineComponent,
onMounted,
reactive,
nextTick,
provide,
} from 'vue'
//
import { HotTable } from '@handsontable/vue3'
import { registerAllModules } from 'handsontable/registry'
import 'handsontable/dist/handsontable.full.min.css'
import { GetInvoiceCodeList } from '../api'
import { GetInvoiceCodeList, GeneralInvoiceDeleteDetail, DeleteInvoiceDetail, GetOpFileList, DownloadOpFile } from '../api'
import InvoiceDetails from './InvoiceDetails.vue'
import { useMessage } from '/@/hooks/web/useMessage'
import DsFile from '/@/components/File/index.vue'
const { createMessage } = useMessage()
defineComponent({
HotTable,
@ -112,10 +149,11 @@ const props = defineProps({
default: '300'
}
})
const emits = defineEmits(['updateAmount','updateListSave'])
function updateList(val){
emits('updateListSave',val)
const emits = defineEmits(['updateAmount', 'updateListSave', 'handleSuccess'])
function updateList(val) {
emits('updateListSave', val)
}
const dsFile = ref('')
//
const feeDict = ref([])
//
@ -137,11 +175,7 @@ const row = {
}
//
const list = ref([]) as any
defineExpose({ list })
provide('temFieldData', list)
const activeKey = ref('1')
//
let oldData = []
//
const allCheck = ref(false)
//
@ -203,13 +237,13 @@ const columns = [
readOnly: true,
},
{
title: '不含税金额',
title: '金额',
width: 150,
data: 'amount',
type: 'numeric',
},
{
title: '金额',
title: '不含税金额',
width: 150,
data: 'noTaxAmount',
type: 'numeric',
@ -314,15 +348,105 @@ const deleteRow = async () => {
list.value.forEach((item) => {
if (item.selected && item.id) ids.push(item.id)
})
const res = list.value.filter((item) => {
return !item.selected
if (ids.length == 0) {
const res = list.value.filter((item) => {
return !item.selected
})
list.value = res
hotTb.value.hotInstance.loadData(res)
} else {
loading.value = true
DeleteInvoiceDetail({ ids }).then(res => {
if (res.succeeded) {
createMessage.success(res.message)
const data = list.value.filter((item) => {
return !item.selected
})
list.value = data
hotTb.value.hotInstance.loadData(data)
}
loading.value = false
})
}
}
function addFile() {
dsFile.value.init()
}
const fileSrc = ref('')
const fileFlag = ref(false)
const fileData = ref([]) as any
const columnsFile = [
{
title: '文件名称',
width: 150,
dataIndex: 'fileName',
},
{
title: '上传日期',
width: 150,
dataIndex: 'createTime',
},
{
title: '上传者',
width: 150,
dataIndex: 'createUserName',
},
{
title: '操作',
width: 150,
dataIndex: 'caozuo',
},
]
function fileSuccess() {
getfileList()
}
const pdfFlag = ref(false)
function lookFile(item) {
fileFlag.value = true
if(item.fileType=='.pdf'){
pdfFlag.value = true
} else {
pdfFlag.value = false
}
DownloadOpFile({ id: item.id }).then(res => {
if (res.data.size > 150) {
fileSrc.value = window.URL.createObjectURL(new Blob([res.data], { type: 'application/pdf;charset=utf-8' }))
}
})
}
const fileloading = ref(false)
const getfileList = () => {
fileloading.value = true
GetOpFileList({ id: props.id }).then(res => {
fileloading.value = false
res.data.forEach(item => {
if (item.createTime) {
item.createTime = new Date(item.createTime)
item.createTime = item.createTime.getFullYear() + '-' + (item.createTime.getMonth() + 1) + '-' + (item.createTime.getDate())
}
item['type'] = item?.filePath?.split('.')[1]
fileData.value = res.data
})
}).catch(() => {
fileloading.value = false
})
}
function download(item) {
DownloadOpFile({ id: item.id }).then(res => {
const pdfUrl = window.URL.createObjectURL(new Blob([res.data], { type: 'application/txt;charset=utf-8' }))
const fname = item.fileName //
const link = document.createElement('a')
link.href = pdfUrl
link.setAttribute('download', fname)
document.body.appendChild(link)
link.click()
})
list.value = res
hotTb.value.hotInstance.loadData(res)
}
//
const init = () => {
const selectedRowKeysFile = ref([]) as any
function onSelectChangeFile(selectedRowKeys) {
selectedRowKeysFile.value = selectedRowKeys
}
//
const add = () => {
@ -349,8 +473,6 @@ onMounted(() => {
}
}
})
//
init()
})
watchEffect(() => {
//
@ -365,13 +487,13 @@ watchEffect(() => {
})
}
})
function init(data) {
list.value = data.invoiceDetails ? data.invoiceDetails : []
hotTb.value.hotInstance.loadData(data.invoiceDetails ? data.invoiceDetails : [])
dataSource.value = data.details ? data.details : []
getfileList()
}
watch(
() => props.id,
() => {
init()
},
)
const taxUnitPriceTotal = ref(0) as any
const taxAmountTotal = ref(0) as any
const amountTotal = ref(0) as any
@ -418,9 +540,122 @@ watch(
},
)
const InvoiceDetailsRef = ref(null) as any
function open(){
function open() {
InvoiceDetailsRef.value.init()
}
const selectedRowKeysDetial = ref([]) as any
const dataSource = ref([])
function onSelectChangeDetail(selectedRowKeys) {
selectedRowKeysDetial.value = selectedRowKeys
}
const columnsData = [
{
title: '委托编号',
dataIndex: 'customerNo',
width: 100,
},
{
title: '主提单号',
dataIndex: 'mblno',
width: 100,
},
{
title: '委托单位',
dataIndex: 'customerName',
width: 200,
},
{
title: '开船日期',
dataIndex: 'etd',
width: 200,
},
{
title: '业务来源',
dataIndex: 'sourceName',
width: 100,
},
{
title: '费用名称',
dataIndex: 'feeName',
width: 100,
},
{
title: '收付',
dataIndex: 'feeType',
width: 100,
},
{
title: '申请金额',
dataIndex: 'orderAmount',
width: 100,
},
{
title: '原始币别',
dataIndex: 'originalCurrency',
width: 100,
},
{
title: '原始汇率',
dataIndex: 'originalRate',
width: 100,
},
{
title: '折算汇率',
dataIndex: 'exchangeRate',
width: 100,
},
{
title: '销项/进项税率',
dataIndex: 'accTaxRate',
width: 200,
},
{
title: '原始金额',
dataIndex: 'originalAmount',
width: 100,
},
{
title: '揽货人',
dataIndex: 'saleName',
width: 100,
},
{
title: '录入方式',
dataIndex: 'inputMethod',
width: 100,
},
{
title: '所属分部',
dataIndex: 'saleDeptName',
width: 100,
},
{
title: '经营单位',
dataIndex: 'inputMethod',
width: 100,
},
{
title: '会计期间',
dataIndex: 'accountDate',
width: 100,
},
]
function delFee() {
loading.value = true
GeneralInvoiceDeleteDetail({ ids: selectedRowKeysDetial.value }).then(res => {
if (res.succeeded) {
emits('handleSuccess')
createMessage.success('删除成功')
}
loading.value = false
})
}
function changeCust(id) {
InvoiceDetailsRef.value.changeCustIn(id)
}
defineExpose({ list, dataSource, init, changeCust })
</script>
<style lang="less" scoped>

@ -17,7 +17,9 @@
<a-textarea v-model:value="model[field]" :auto-size="{ minRows: 4, maxRows: 7 }" />
</template>
</BasicForm>
<feeTable @updateListSave=updateListSave @updateAmount="updateAmount" ref="feeTableRef"></feeTable>
<feeTable :id="id" @handleSuccess="handleSuccess" @updateListSave=updateListSave @updateAmount="updateAmount"
ref="feeTableRef">
</feeTable>
<a-modal @cancel="open = false" width="700px" :visible="open" title="模板设置" @ok="handleSaveTemp">
<div style="display: flex;">
<div class="label-list">
@ -58,6 +60,8 @@ import {
} from '/@/views/operation/seaexport/api/BookingLedger'
import { GetFeeCurrencySelectList, GetClientListByCode } from '/@/api/common'
import dayjs from 'dayjs'
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
const CategoryData = [
{ value: 0, label: '普通发票' },
{ value: 1, label: '电子发票' },
@ -264,6 +268,7 @@ const detailForm = [
formModel.customer = item
}
})
feeTableRef.value.changeCust(obj.id)
}
if (!obj && !e) {
bankList.value = []
@ -278,7 +283,6 @@ const detailForm = [
label: '代开客户',
field: 'autualCustomerName',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
@ -376,6 +380,7 @@ async function handleSave() {
InvoiceApplicationSave(data).then(res => {
if (res.succeeded) {
createMessage.success('保存成功')
go(`/invoiceapplyDetail?id=${res.data.id}`)
} else {
createMessage.error(res.message)
}
@ -447,25 +452,8 @@ function getDetail() {
InvoiceApplicationGet({ id: id.value }).then(res => {
if (res.succeeded) {
setFieldsValue(res.data)
const queryStr = [{
FieldName: 'ClientId',
FieldValue: res.data.customerId,
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
})
getBankInfo(res.data.customerId)
feeTableRef.value.init(res.data)
}
})
@ -479,8 +467,48 @@ function openTempName() {
})
})
}
function updateListSave() {
function getBankInfo(customerId) {
const queryStr = [{
FieldName: 'ClientId',
FieldValue: customerId,
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
})
}
function handleSuccess() {
getDetail()
}
async function updateListSave(arr) {
const values = await validate()
const data = {
...values,
details: arr
}
loading.value = true
InvoiceApplicationSave(data).then(res => {
if (res.succeeded) {
createMessage.success('保存成功')
go(`/invoiceapplyDetail?id=${res.data.id}`)
} else {
createMessage.error(res.message)
}
loading.value = false
}).catch(err => {
loading.value = false
})
}
const tempNameId = ref('')
function handleRender() {

@ -72,7 +72,6 @@ function init() {
var contentDisposition = res.headers['content-disposition']
var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
var result = patt.exec(contentDisposition) as any
console.log(patt,result,contentDisposition,res)
var filename = result[1]
var reg = /^["](.*)["]$/g
pdfName.value = decodeURI(filename.replace(reg, '$1'))

Loading…
Cancel
Save