往来单位 调整

szh-new
张同海 3 months ago
commit bb2fc22263

@ -19,6 +19,9 @@
inheritAttrs: false, inheritAttrs: false,
props: { props: {
value: [Array, Object, String, Number], value: [Array, Object, String, Number],
api: {
type: Function,
},
disabled: { disabled: {
type: Boolean, type: Boolean,
}, },

@ -8,6 +8,42 @@
@ok="handleSave" @ok="handleSave"
> >
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
<div class="HotTable">
<div>
<a-button type="link" @click="TableAdd" class="pl0">
<span class="iconfont icon-new_document"></span>
新增
</a-button>
<a-popconfirm
title="确定要删除所选数据?"
ok-text="确定"
cancel-text="取消"
@confirm="FnClickDel"
>
<a-button type="link" class="pl0">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</div>
<div style="position: relative">
<input
class="ds-tb-check ds-goods-tb-check"
type="checkbox"
v-model="allCheck"
:indeterminate="someCheck"
v-if="list.length !== 0"
/>
<hot-table ref="hotTb" :data="list" :settings="settings">
<img
v-show="!list.length"
class="hot-tb-no-data"
src="../../../assets/images/nodata.png"
alt=""
/>
</hot-table>
</div>
</div>
<!--右下角按钮--> <!--右下角按钮-->
<template #footer> <template #footer>
<a-button <a-button
@ -38,12 +74,15 @@
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref } from 'vue' import { ref, computed, unref, watchEffect, watch } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { CADformSchema } from './columns' import { CADformSchema } from './columns'
import { editClientBank, getClientBankInfo } from './api' import { editClientBank, getClientBankInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { HotTable } from '@handsontable/vue3'
import { registerAllModules } from 'handsontable/registry'
registerAllModules()
// Emits // Emits
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true) const isUpdate = ref(true)
@ -58,6 +97,9 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields() resetFields()
list.value.splice(0)
allCheck.value = false
someCheck.value = false
setModalProps({ confirmLoading: false, loading: true }) setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
rowId.value = data.record.id rowId.value = data.record.id
@ -68,10 +110,13 @@
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
res.data.invoiceHeaders.forEach((item) => {
list.value.push(item)
})
} }
setModalProps({ confirmLoading: false }) setModalProps({ confirmLoading: false })
} else { } else {
setFieldsValue({ permissionIdentity: unref(2), clientId: data.record.id }) setFieldsValue({ clientId: data.record.id })
} }
setModalProps({ loading: false }) setModalProps({ loading: false })
}) })
@ -81,6 +126,7 @@
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
values.invoiceHeaders = list.value
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
// TODO custom api // TODO custom api
@ -92,11 +138,11 @@
// //
if (!exit) { if (!exit) {
if (unref(isUpdate)) { if (unref(isUpdate)) {
// await refresh() await refresh()
} else { } else {
rowId.value = res.data rowId.value = res.data
isUpdate.value = true isUpdate.value = true
// await refresh() await refresh()
} }
} }
} }
@ -106,12 +152,142 @@
setModalProps({ confirmLoading: false, loading: false }) setModalProps({ confirmLoading: false, loading: false })
} }
} }
// async function refresh() { // ---------------------------------------
// const res: API.DataResult = await getClientBankInfo({ id: unref(rowId) }) const list = ref<any>([])
// if (res.succeeded) { //
// await setFieldsValue({ const allCheck = ref(false)
// ...res.data, //
// }) const someCheck = ref(false)
// } const hotTb = ref()
// } watchEffect(() => {
//
if (allCheck.value) {
list.value.forEach((item: any) => {
item.selected = true
})
} else {
//
list.value.forEach((item: any) => {
item.selected = false
})
}
})
watch(
list.value,
(val) => {
let a = 0
let b = 0
val.forEach((item: any) => {
if (item.selected) {
a += 1
} else {
b += 1
}
})
if (a == 0) {
allCheck.value = false
}
if (b == 0) {
allCheck.value = true
}
if (a != 0 && b != 0) {
someCheck.value = true
} else {
someCheck.value = false
}
},
{
deep: true,
},
)
const columns = [
{
data: 'selected',
type: 'checkbox',
title: ' ',
width: 32,
className: 'htCenter',
readOnly: false,
},
{
title: '主键ID',
width: 200,
data: 'id',
},
{
title: '关联ID',
width: 200,
data: 'relativeId',
},
{
title: '发票抬头',
width: 200,
data: 'header',
},
{
title: '地址电话',
width: 300,
data: 'addressTel',
},
]
const settings = {
height: '260',
autoWrapRow: true,
autoWrapCol: true,
//
rowHeights: 26,
fixedColumnsLeft: 1,
//
hiddenColumns: {
columns: [1, 2],
indicators: true,
},
//
enterMoves: 'row',
columnSorting: true,
//
afterValidate: function (isValid, value, row, prop, source) {
if (!isValid) {
hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
}
},
columns: columns,
// ()
licenseKey: 'non-commercial-and-evaluation',
//
async afterChange(changes, source) {},
}
function TableAdd() {
if (rowId.value) {
list.value.push({ selected: false, relativeId: rowId.value })
} else {
notification.warning({ message: '请先保存', duration: 3 })
}
}
function FnClickDel() {
if (rowId.value) {
list.value.forEach((e: any, i) => {
if (e.selected) {
if (e.id) {
list.value.splice(i, 1)
}
}
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
}
}
async function refresh() {
const res: API.DataResult = await getClientBankInfo({ id: unref(rowId) })
if (res.succeeded) {
rowId.value = res.data.id
setFieldsValue({
...res.data,
})
list.value.splice(0)
res.data.invoiceHeaders.forEach((item) => {
list.value.push(item)
})
}
}
</script> </script>

@ -14,6 +14,12 @@ import {
GetUserList, GetUserList,
GetAllClientList, GetAllClientList,
} from '/@/api/common' } from '/@/api/common'
import {
GetSaleList,
GetCustomerServiceList,
GetOperatorUserList,
GetVouchingClerkList,
} from '/@/views/operation/seaexport/api/BookingLedger'
let ClientCountryList = [] let ClientCountryList = []
const res4: API.DataResult = await getClientCountrySelectList() const res4: API.DataResult = await getClientCountrySelectList()
if (res4.succeeded) { if (res4.succeeded) {
@ -387,8 +393,8 @@ export const EditformSchema: FormSchema[] = [
}, },
}, },
{ {
label: '揽货人Name', label: '揽货人ID',
field: 'saleName', field: 'saleId',
component: 'DEdit', component: 'DEdit',
defaultValue: '', defaultValue: '',
show: false, show: false,
@ -402,28 +408,28 @@ export const EditformSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'saleId',
label: '揽货人', label: '揽货人',
field: 'sale',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '', defaultValue: '',
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: SaleUserList, api: GetSaleList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, showName: 'userName',
filterOption: (input: string, option: any) => { valueField: 'userName',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 immediate: false,
}, resultField: 'data',
onChange: (e, obj) => { onChange: async (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.saleId = obj.value formModel.saleId = obj.id
formModel.saleName = obj.label formModel.sale = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.saleId = '' formModel.saleId = ''
formModel.saleName = '' formModel.sale = ''
} }
}, },
onEdit: () => { onEdit: () => {
@ -434,14 +440,14 @@ export const EditformSchema: FormSchema[] = [
}, },
}, },
{ {
label: '客服Name', label: '客服ID',
field: 'customerServiceName', field: 'customerService',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'customerService', field: 'customerServiceName',
label: '客服', label: '客服',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
@ -449,16 +455,18 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: CustomerServiceList, api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
}, onChange: async (e, obj) => {
onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.customerService = obj.value formModel.customerService = obj.id
formModel.customerServiceName = obj.label formModel.customerServiceName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.customerService = '' formModel.customerService = ''
@ -474,13 +482,13 @@ export const EditformSchema: FormSchema[] = [
}, },
{ {
label: '操作人Name', label: '操作人Name',
field: 'operatorName', field: 'operatorId',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'operatorId', field: 'operatorName',
label: '操作人', label: '操作人',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
@ -488,16 +496,18 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: OperatorUserList, api: GetOperatorUserList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.operatorId = obj.value formModel.operatorId = obj.id
formModel.operatorName = obj.label formModel.operatorName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.operatorId = '' formModel.operatorId = ''
@ -513,13 +523,13 @@ export const EditformSchema: FormSchema[] = [
}, },
{ {
label: '单证Name', label: '单证Name',
field: 'docName', field: 'doc',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'doc', field: 'docName',
label: '单证', label: '单证',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
@ -527,16 +537,16 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: VouchingClerkList, api: GetVouchingClerkList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, valueField: 'userName',
filterOption: (input: string, option: any) => { showName: 'userName',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 immediate: false,
}, resultField: 'data',
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.doc = obj.value formModel.doc = obj.id
formModel.docName = obj.label formModel.docName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.doc = '' formModel.doc = ''

@ -1,129 +0,0 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>仅保存</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>保存并关闭</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { ApiEdit, ApiInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
let RshipperType = []
res.data.shipperType.split(',').forEach((e) => {
RshipperType.push(parseInt(e))
})
res.data.shipperType = RshipperType
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ permissionIdentity: unref(2), clientId: data.clientId })
}
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增费用模板' : '编辑费用模板'))
async function handleSave(exit) {
try {
const values = await validate()
let shipperTypeS = ''
values.shipperType.forEach((item) => {
if (shipperTypeS == '') {
shipperTypeS = item
} else {
shipperTypeS = `${shipperTypeS},${item}`
}
})
values.shipperType = shipperTypeS
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await ApiEdit(values)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
}
}
setModalProps({ confirmLoading: false, loading: false })
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>

@ -1,41 +0,0 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/feeApi/FeeCustTemplate/GetList',
edit = '/feeApi/FeeCustTemplate/Edit',
info = '/feeApi/FeeCustTemplate/Edit',
del = '/feeApi/FeeCustTemplate/Delete',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 批量删除 (Auth)
export function ApiDel(data: PageRequest) {
return request<DataResult>({
url: Api.del,
method: 'post',
data,
})
}

@ -1,171 +0,0 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { getDictDropDown } from '/@/api/common'
let shipperTypeList: any = []
const res2: API.DataResult = await getDictDropDown({ code: 'shipper_type' })
if (res2.succeeded) {
shipperTypeList = []
res2.data.forEach((e) => {
shipperTypeList.push({ label: e.name, value: Number(e.value) })
})
}
export const columns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 150,
},
{
title: '业务类型',
dataIndex: 'businessTypeText',
width: 150,
},
{
title: '费用类型',
dataIndex: 'feeTypeText',
width: 150,
},
{
title: '说明',
dataIndex: 'description',
width: 150,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'ShortName',
label: '简称',
component: 'Input',
colProps: { span: 6 },
},
]
export const formSchema: FormSchema[] = [
{
label: '主键Id',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '客户id',
field: 'clientId',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'codeName',
label: '代码',
required: true,
component: 'Input',
colProps: { span: 12 },
},
{
field: 'shortName',
label: '简称',
required: true,
component: 'Input',
colProps: { span: 12 },
},
{
field: 'name',
label: '公司全称',
component: 'Input',
colProps: { span: 12 },
},
{
field: 'address',
label: '地址',
component: 'Input',
colProps: { span: 12 },
},
{
field: 'shipperType',
label: '类型',
required: true,
component: 'Select',
colProps: { span: 12 },
componentProps: {
options: shipperTypeList,
allowClear: true,
showSearch: true,
mode: 'multiple',
class: 'NoLimitHeight',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
field: 'attn',
label: '联系人',
component: 'Input',
colProps: { span: 12 },
defaultValue: '',
},
{
field: 'email',
label: '邮箱',
component: 'Input',
colProps: { span: 12 },
defaultValue: '',
},
{
field: 'tel',
label: '电话',
component: 'Input',
colProps: { span: 12 },
defaultValue: '',
},
{
field: 'companyNo',
label: '公司代码',
component: 'Input',
colProps: { span: 12 },
defaultValue: 0,
},
{
field: 'isPublic',
label: '是否公共标识',
component: 'Switch',
defaultValue: false,
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
unCheckedChildren: '否',
},
},
{
field: 'status',
label: '是否可用',
component: 'Switch',
defaultValue: 0,
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
checkedValue: 0,
unCheckedChildren: '否',
unCheckedValue: 1,
},
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 12 },
componentProps: {
rows: 2,
},
},
{
field: 'shortDetail',
label: '详细信息',
component: 'InputTextArea',
colProps: { span: 12 },
componentProps: {
rows: 2,
},
},
]

@ -1,148 +0,0 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable" @row-dbClick="handleAudit">
<template #toolbar>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加费用模板
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleAudit.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
color: 'error',
popConfirm: {
title: '是否要删除此条数据?',
okText: '是',
cancelText: '否',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { defineComponent, onMounted, ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { ApiList, ApiDel } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const props = defineProps({
clientId: { type: String },
})
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '费用模板列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
// if (!!data.ShortName) {
// condition.push({
// FieldName: 'ShortName',
// FieldValue: data.ShortName,
// ConditionalType: 1,
// })
// }
condition.push({
FieldName: 'ClientId',
FieldValue: props.clientId,
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
// useSearchForm: true,
// formConfig: {
// labelWidth: 120,
// schemas: searchFormSchema,
// },
pagination: true,
bordered: true,
showTableSetting: false,
canResize: true,
resizeHeightOffset: 35,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function handleCreate() {
openModal(true, {
clientId: props.clientId,
isParent: false,
isUpdate: false,
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
// record: { clientId: props.clientId, ...record },
isUpdate: true,
})
}
//
async function handleDelete(record: Recordable) {
const res: API.DataResult = await ApiDel({
id: '',
ids: [record.id],
})
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
reload()
} else {
notification.error({ message: res.message, duration: 3 })
}
}
function handleSuccess() {
reload()
}
</script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

@ -138,9 +138,6 @@
<Tabs3 :client-id="clientId" :saleId="saleId" :sourceId="sourceId" /> <Tabs3 :client-id="clientId" :saleId="saleId" :sourceId="sourceId" />
</div> </div>
</a-tab-pane> </a-tab-pane>
<!-- <a-tab-pane key="3" tab="费用模板">
<FeeCustTemplate :client-id="clientId" class="RUnit" />
</a-tab-pane> -->
<!-- 联系人信息 --> <!-- 联系人信息 -->
<a-tab-pane key="4" tab="联系人信息"> <a-tab-pane key="4" tab="联系人信息">
<Menus2 :client-id="clientId" class="RUnit" /> <Menus2 :client-id="clientId" class="RUnit" />
@ -192,7 +189,6 @@
import Menus2 from './menu2/index.vue' import Menus2 from './menu2/index.vue'
import Menus3 from './menu3/index.vue' import Menus3 from './menu3/index.vue'
import CustTemplateDetail from './custTemplateDetail/index.vue' import CustTemplateDetail from './custTemplateDetail/index.vue'
import FeeCustTemplate from './FeeCustTemplate/index.vue'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import CustomerParams from './customerParams/index.vue' import CustomerParams from './customerParams/index.vue'
import ReleaseType from './ReleaseType/index.vue' import ReleaseType from './ReleaseType/index.vue'
@ -226,7 +222,7 @@
const { data } = res const { data } = res
if (data && data.length) { if (data && data.length) {
const content = JSON.parse(data[0].content).columns const content = JSON.parse(data[0].content).columns
await updateSchema(content) updateSchema(content)
DIYformSchema.value = content DIYformSchema.value = content
} }
} }
@ -425,21 +421,12 @@
// //
function addboxLine(record) { function addboxLine(record) {
openModal(true, { openModal(true, {
// clientId: props.clientId,
record, record,
isUpdate: false, isUpdate: false,
}) })
// const data = {
// rowKey: dataSource.value.length
// ? dataSource.value[dataSource.value.length - 1].rowKey + 1
// : 1,
// }
// setTableData([...getDataSource(), data])
} }
// //
function editboxLine(record) { function editboxLine(record) {
// go(`/infoclientDetail?id=${row.id}`)
openModal(true, { openModal(true, {
record, record,
isUpdate: true, isUpdate: true,

@ -23,9 +23,15 @@ import {
import { import {
GetClientSourceDetailSelectList, GetClientSourceDetailSelectList,
GetServiceProjectList, GetServiceProjectList,
GetSaleList,
GetCustomerServiceList,
GetOperatorUserList,
GetVouchingClerkList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
// exports {}
let ClientFrtList = [] let ClientFrtList = []
const res: API.DataResult = await getClientFrtSelectList() const res: API.DataResult = await getClientFrtSelectList()
if (res.succeeded) { if (res.succeeded) {
@ -50,6 +56,14 @@ if (res4.succeeded) {
ClientCountryList.push({ label: e.countryName, value: e.id }) ClientCountryList.push({ label: e.countryName, value: e.id })
}) })
} }
let OperatorUserList = []
const res6: API.DataResult = await getOperatorUserList()
if (res6.succeeded) {
OperatorUserList = []
res6.data.forEach((e) => {
OperatorUserList.push({ label: e.userName, value: e.id })
})
}
let VouchingClerkList = [] let VouchingClerkList = []
const res7: API.DataResult = await getVouchingClerkList() const res7: API.DataResult = await getVouchingClerkList()
if (res7.succeeded) { if (res7.succeeded) {
@ -58,6 +72,38 @@ if (res7.succeeded) {
VouchingClerkList.push({ label: e.userName, value: e.id }) VouchingClerkList.push({ label: e.userName, value: e.id })
}) })
} }
let SaleUserList = []
const res8: API.DataResult = await getSaleUserList()
if (res8.succeeded) {
SaleUserList = []
res8.data.forEach((e) => {
SaleUserList.push({ label: e.userName, value: e.id })
})
}
let CustomerServiceList = []
const res9: API.DataResult = await getCustomerServiceList()
if (res9.succeeded) {
CustomerServiceList = []
res9.data.forEach((e) => {
CustomerServiceList.push({ label: e.userName, value: e.id })
})
}
let OrgTree = []
const res11: API.DataResult = await GetAllClientList()
if (res11.succeeded) {
OrgTree = []
res11.data.forEach((e) => {
OrgTree.push({ label: e.shortName, value: e.id })
})
}
let UserData = []
const res13: API.DataResult = await GetUserList()
if (res13.succeeded) {
UserData = []
res13.data.forEach((e) => {
UserData.push(e)
})
}
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '助记码', title: '助记码',
@ -305,25 +351,25 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ // {
field: 'codeName', // field: 'codeName',
label: '助记码', // label: '助记码',
component: 'Input', // component: 'Input',
colProps: { span: 4 }, // colProps: { span: 4 },
}, // },
{ // {
field: 'registrationNo', // field: 'registrationNo',
label: '海关备案号', // label: '海关备案号',
component: 'Input', // component: 'Input',
colProps: { span: 4 }, // colProps: { span: 4 },
}, // },
{ // {
field: 'inspectionNo', // field: 'inspectionNo',
label: '商检备案号', // label: '商检备案号',
component: 'Input', // component: 'Input',
colProps: { span: 4 }, // colProps: { span: 4 },
}, // },
{ {
field: 'organizationCode', field: 'organizationCode',
label: '社会信用代码', label: '社会信用代码',
@ -510,31 +556,28 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'sale', field: 'saleId',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'saleId',
label: '揽货人', label: '揽货人',
field: 'sale',
component: 'ApiSelect', component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: getSaleUserList, api: GetSaleList,
labelField: 'pinYinCode',
showName: 'userName',
valueField: 'userName',
resultField: 'data', resultField: 'data',
labelField: 'userName', onChange: async (e, obj) => {
valueField: 'id',
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.saleId = obj.value formModel.saleId = obj.id
formModel.sale = obj.label formModel.sale = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.saleId = '' formModel.saleId = ''
@ -546,30 +589,28 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'customerServiceName', field: 'customerService',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'customerService', field: 'customerServiceName',
label: '客服', label: '客服',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: getCustomerServiceList, api: GetCustomerServiceList,
resultField: 'data', labelField: 'pinYinCode',
labelField: 'userName', showName: 'userName',
valueField: 'id', valueField: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { resultField: 'data',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 onChange: async (e, obj) => {
},
onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.customerService = obj.value formModel.customerService = obj.id
formModel.customerServiceName = obj.label formModel.customerServiceName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.customerService = '' formModel.customerService = ''
@ -579,33 +620,32 @@ export const formSchema: FormSchema[] = [
} }
}, },
}, },
// 操作人Name // 操作人ID
{ {
label: '', label: '',
field: 'operatorName', field: 'operatorId',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'operatorId', field: 'operatorName',
label: '操作人', label: '操作人',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: getOperatorUserList, api: GetOperatorUserList,
resultField: 'data', labelField: 'pinYinCode',
labelField: 'userName', valueField: 'userName',
valueField: 'id', showName: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.operatorId = obj.value formModel.operatorId = obj.id
formModel.operatorName = obj.label formModel.operatorName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.operatorId = '' formModel.operatorId = ''
@ -617,28 +657,28 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'docName', field: 'doc',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'doc', field: 'docName',
label: '单证', label: '单证',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: VouchingClerkList, api: GetVouchingClerkList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, valueField: 'userName',
filterOption: (input: string, option: any) => { showName: 'userName',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 immediate: false,
}, resultField: 'data',
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.doc = obj.value formModel.doc = obj.id
formModel.docName = obj.label formModel.docName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.doc = '' formModel.doc = ''
@ -651,17 +691,11 @@ export const formSchema: FormSchema[] = [
{ {
field: 'commissionUserId', field: 'commissionUserId',
label: '提成参与人', label: '提成参与人',
component: 'ApiSelect', component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: () => {
return { return {
api: GetUserList, options: UserData,
resultField: 'data',
labelField: 'label',
valueField: 'value',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
} }
}, },
}, },
@ -847,14 +881,13 @@ export const formSchema: FormSchema[] = [
{ {
field: 'pcorpId', field: 'pcorpId',
label: '所属集团', label: '所属集团',
component: 'ApiSelect', component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetAllClientList, options: OrgTree,
labelField: 'shortName', allowClear: true,
valueField: 'id', showSearch: true,
resultField: 'data',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
@ -964,7 +997,7 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '服务项目', label: '服务项目',
field: 'notifications1', field: 'serviceItemCodes',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
@ -1354,14 +1387,18 @@ export const CADformSchema: FormSchema[] = [
{ {
field: 'isInvoiceDefault', field: 'isInvoiceDefault',
label: '是否开票默认账户', label: '是否开票默认账户',
component: 'RadioButtonGroup', component: 'Switch',
colProps: { span: 6 }, colProps: { span: 6 },
defaultValue: false, defaultValue: false,
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, checkedValue: true,
{ label: '否', value: false }, unCheckedChildren: '否',
], unCheckedValue: false,
// options: [
// { label: '是', value: true },
// { label: '否', value: false },
// ],
}, },
}, },
{ {

@ -1,9 +1,9 @@
<template> <template>
<!-- :form-schema="formSchema" -->
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
:use-wrapper="true" :use-wrapper="true"
:title="getTitle" :title="getTitle"
:form-schema="formSchema"
width="50%" width="50%"
@register="registerModal" @register="registerModal"
@ok="handleSave" @ok="handleSave"

@ -1,9 +1,9 @@
<template> <template>
<!-- :form-schema="formSchema" -->
<BasicModal <BasicModal
v-bind="$attrs" v-bind="$attrs"
:use-wrapper="true" :use-wrapper="true"
:title="getTitle" :title="getTitle"
:form-schema="formSchema"
width="50%" width="50%"
@register="registerModal" @register="registerModal"
@ok="handleSave" @ok="handleSave"

@ -4,14 +4,14 @@ import { useOptionsStore } from '/@/store/modules/options'
import { SlotFlags } from '@vue/shared' import { SlotFlags } from '@vue/shared'
import { getOptions } from '/@/hooks/dict' import { getOptions } from '/@/hooks/dict'
import { BookingLabelList, GetSlotUseToConfig } from './api' import { BookingLabelList, GetSlotUseToConfig } from './api'
import { GetClientListByCode, GetControllerClientList,GetCarrierSelectList } from '/@/api/common' import { GetClientListByCode, GetControllerClientList, GetCarrierSelectList } from '/@/api/common'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
import { import {
GetCarrierlist, GetCarrierlist,
GetClientLanesSelectList, GetClientLanesSelectList,
GetClientPortSelectList, GetClientPortSelectList,
GetSaleList, GetSaleList,
GetClientGoodsList GetClientGoodsList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
// 字典 // 字典
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
@ -37,7 +37,7 @@ const sharedOnCell = (_, index) => {
} }
} }
} }
const sharedOnCell1 = (_, index) => { } const sharedOnCell1 = (_, index) => {}
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'slotBookingNo', field: 'slotBookingNo',
@ -96,11 +96,9 @@ export const searchFormSchema: FormSchema[] = [
valueField: 'ediCode', valueField: 'ediCode',
showName: 'ediCode', showName: 'ediCode',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {},
}
} }
} },
}, },
{ {
field: 'PORTDISCHARGE', field: 'PORTDISCHARGE',
@ -117,11 +115,9 @@ export const searchFormSchema: FormSchema[] = [
valueField: 'ediCode', valueField: 'ediCode',
showName: 'ediCode', showName: 'ediCode',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {},
}
} }
} },
}, },
{ {
field: 'etd', field: 'etd',
@ -299,7 +295,7 @@ export const searchFormSchema: FormSchema[] = [
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: (e, obj) => { }, onChange: (e, obj) => {},
} }
}, },
}, },
@ -875,7 +871,7 @@ export const detialForm: FormSchema[] = [
formModel.carrierId = '' formModel.carrierId = ''
formModel.carrierCode = '' formModel.carrierCode = ''
} }
} },
} }
}, },
}, },
@ -1038,16 +1034,16 @@ export const detialForm: FormSchema[] = [
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.portLoadId = obj.id formModel.portLoadId = obj.id
formModel.portLoadCode = obj.ediCode formModel.portLoadCode = obj.ediCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.portLoadId = null formModel.portLoadId = null
formModel.portLoadCode = null formModel.portLoadCode = null
} }
} },
} }
} },
}, },
{ {
label: '', label: '',
@ -1234,7 +1230,7 @@ export const useDetailForm: FormSchema[] = [
options: useTypeList, options: useTypeList,
fieldNames: { fieldNames: {
label: 'name', label: 'name',
value: 'code' value: 'code',
}, },
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
@ -1312,7 +1308,7 @@ export const useDetailForm: FormSchema[] = [
if (!e && !obj) { if (!e && !obj) {
formModel.useToVal = '' formModel.useToVal = ''
} }
} },
} }
}, },
}, },
@ -1345,7 +1341,7 @@ export const useDetailForm: FormSchema[] = [
if (!e && !obj) { if (!e && !obj) {
formModel.useToVal = null formModel.useToVal = null
} }
} },
} }
}, },
}, },
@ -1379,9 +1375,9 @@ export const useDetailForm: FormSchema[] = [
if (!v && !obj) { if (!v && !obj) {
formModel.useToVal = null formModel.useToVal = null
} }
} },
} }
} },
}, },
{ {
field: 'useToValShow', field: 'useToValShow',
@ -1410,7 +1406,7 @@ export const useDetailForm: FormSchema[] = [
if (!v && !obj) { if (!v && !obj) {
formModel.useToVal = null formModel.useToVal = null
} }
} },
} }
}, },
}, },
@ -1431,7 +1427,7 @@ export const useDetailForm: FormSchema[] = [
options: goodsList.value, options: goodsList.value,
fieldNames: { fieldNames: {
label: 'showName', label: 'showName',
value: 'hsCode' value: 'hsCode',
}, },
onChange: (v, obj) => { onChange: (v, obj) => {
if (v && obj) { if (v && obj) {
@ -1441,30 +1437,29 @@ export const useDetailForm: FormSchema[] = [
formModel.useToVal = null formModel.useToVal = null
} }
}, },
onSearch:(val)=>{ onSearch: (val) => {
GetClientGoodsList({queryKey:val}).then(res=>{ GetClientGoodsList({ queryKey: val }).then((res) => {
res.data.forEach(item=>{ res.data.forEach((item) => {
item.showName = item.hsCode + '/' + item.goodName item.showName = item.hsCode + '/' + item.goodName
}) })
goodsList.value = res.data goodsList.value = res.data
}) })
} },
} }
}, },
}, },
] ]
let useTypeList = [] let useTypeList = []
const goodsList = ref([]) const goodsList = ref([])
function getUseTypeList() { function getUseTypeList() {
GetSlotUseToConfig().then(res => { GetSlotUseToConfig().then((res) => {
useTypeList = res.data useTypeList = res.data
}) })
} }
function getGoodsList() { function getGoodsList() {
GetClientGoodsList().then(res => { GetClientGoodsList().then((res) => {
res.data.forEach(item=>{ res.data.forEach((item) => {
item.showName = item.hsCode + '/' + item.goodName item.showName = item.hsCode + '/' + item.goodName
}) })
goodsList.value = res.data goodsList.value = res.data
@ -1472,4 +1467,4 @@ function getGoodsList() {
} }
getUseTypeList() getUseTypeList()
getGoodsList() getGoodsList()

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save