更新舱位标签

szh-new
sunzehua 4 months ago
parent 07c00fb12b
commit 285fcf0d50

@ -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 = ''
}
},
}
}
},
},

@ -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 = ''
}
},
}

@ -130,3 +130,19 @@ export function InvoiceApplicationBizSave(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,
})
}

@ -31,7 +31,7 @@ import {
} 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 +48,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,
}
},
},

@ -6,7 +6,7 @@
}
">
<template #tableTitle>
<a-button v-repeat type="link" @click="GoDetailed(false, null)">
<a-button v-repeat type="link" @click="addDetailed()">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
@ -177,6 +177,11 @@ function init() {
onChange: onSelectChange
},
})
if(customerIdP.value){
getForm().setFieldsValue({
customerId: customerIdP.value
})
}
}, 500)
}
const rmbTotal = ref(0)
@ -213,13 +218,19 @@ function handleAddDetial() {
item.originalProcessedAmount = item.processedAmount ? item.processedAmount : 0
})
emits('updateList', arr)
}
const selectedRowKeysDetial = ref([]) as any
function onSelectChangeDetail(selectedRowKeys) {
selectedRowKeysDetial.value = selectedRowKeys
}
defineExpose({ init })
function addDetailed(){
getSelectRows()
}
const customerIdP = ref('')
function changeCustIn(id){
customerIdP.value = id
}
defineExpose({ init,changeCustIn })
</script>
<style lang="less" scoped>
.total {

@ -11,33 +11,40 @@
<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-jia"></span>
删除申请明细
</a-button>
</a-popconfirm>
</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 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 class="total">
合计
<span class="total-item">
@ -64,19 +71,15 @@ 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 } from '../api'
import InvoiceDetails from './InvoiceDetails.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
@ -112,9 +115,9 @@ 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 feeDict = ref([])
@ -137,11 +140,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 +202,13 @@ const columns = [
readOnly: true,
},
{
title: '不含税金额',
title: '金额',
width: 150,
data: 'amount',
type: 'numeric',
},
{
title: '金额',
title: '不含税金额',
width: 150,
data: 'noTaxAmount',
type: 'numeric',
@ -314,16 +313,29 @@ 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
})
list.value = res
hotTb.value.hotInstance.loadData(res)
}
//
const init = () => {
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
})
}
}
//
const add = () => {
const deepCopyRow = JSON.parse(JSON.stringify(row))
@ -349,8 +361,6 @@ onMounted(() => {
}
}
})
//
init()
})
watchEffect(() => {
//
@ -365,13 +375,12 @@ watchEffect(() => {
})
}
})
function init(data) {
list.value = data.invoiceDetails ? data.invoiceDetails : []
hotTb.value.hotInstance.loadData(data.invoiceDetails ? data.invoiceDetails : [])
dataSource.value = data.details ? data.details : []
}
watch(
() => props.id,
() => {
init()
},
)
const taxUnitPriceTotal = ref(0) as any
const taxAmountTotal = ref(0) as any
const amountTotal = ref(0) as any
@ -418,9 +427,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,7 @@
<a-textarea v-model:value="model[field]" :auto-size="{ minRows: 4, maxRows: 7 }" />
</template>
</BasicForm>
<feeTable @updateListSave=updateListSave @updateAmount="updateAmount" ref="feeTableRef"></feeTable>
<feeTable @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">
@ -264,6 +264,7 @@ const detailForm = [
formModel.customer = item
}
})
feeTableRef.value.changeCust(obj.id)
}
if (!obj && !e) {
bankList.value = []
@ -278,7 +279,7 @@ const detailForm = [
label: '代开客户',
field: 'autualCustomerName',
component: 'ApiSelect',
required: false,
required: true,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
@ -447,25 +448,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 +463,47 @@ 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('保存成功')
} else {
createMessage.error(res.message)
}
loading.value = false
}).catch(err => {
loading.value = false
})
}
const tempNameId = ref('')
function handleRender() {

Loading…
Cancel
Save