往来单位 调整

szh-new
张同海 3 months ago
commit bb2fc22263

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

@ -8,6 +8,42 @@
@ok="handleSave"
>
<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>
<a-button
@ -38,12 +74,15 @@
</BasicModal>
</template>
<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 { BasicForm, useForm } from '/@/components/Form/index'
import { CADformSchema } from './columns'
import { editClientBank, getClientBankInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
import { HotTable } from '@handsontable/vue3'
import { registerAllModules } from 'handsontable/registry'
registerAllModules()
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
@ -58,6 +97,9 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
list.value.splice(0)
allCheck.value = false
someCheck.value = false
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
rowId.value = data.record.id
@ -68,10 +110,13 @@
setFieldsValue({
...res.data,
})
res.data.invoiceHeaders.forEach((item) => {
list.value.push(item)
})
}
setModalProps({ confirmLoading: false })
} else {
setFieldsValue({ permissionIdentity: unref(2), clientId: data.record.id })
setFieldsValue({ clientId: data.record.id })
}
setModalProps({ loading: false })
})
@ -81,6 +126,7 @@
async function handleSave(exit) {
try {
const values = await validate()
values.invoiceHeaders = list.value
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
@ -92,11 +138,11 @@
//
if (!exit) {
if (unref(isUpdate)) {
// await refresh()
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
// await refresh()
await refresh()
}
}
}
@ -106,12 +152,142 @@
setModalProps({ confirmLoading: false, loading: false })
}
}
// async function refresh() {
// const res: API.DataResult = await getClientBankInfo({ id: unref(rowId) })
// if (res.succeeded) {
// await setFieldsValue({
// ...res.data,
// })
// }
// }
// ---------------------------------------
const list = ref<any>([])
//
const allCheck = ref(false)
//
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>

@ -14,6 +14,12 @@ import {
GetUserList,
GetAllClientList,
} from '/@/api/common'
import {
GetSaleList,
GetCustomerServiceList,
GetOperatorUserList,
GetVouchingClerkList,
} from '/@/views/operation/seaexport/api/BookingLedger'
let ClientCountryList = []
const res4: API.DataResult = await getClientCountrySelectList()
if (res4.succeeded) {
@ -387,8 +393,8 @@ export const EditformSchema: FormSchema[] = [
},
},
{
label: '揽货人Name',
field: 'saleName',
label: '揽货人ID',
field: 'saleId',
component: 'DEdit',
defaultValue: '',
show: false,
@ -402,28 +408,28 @@ export const EditformSchema: FormSchema[] = [
},
},
{
field: 'saleId',
label: '揽货人',
field: 'sale',
component: 'DEdit',
colProps: { span: 4 },
defaultValue: '',
componentProps: (e) => {
const { formModel } = e
return {
options: SaleUserList,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
api: GetSaleList,
labelField: 'pinYinCode',
showName: 'userName',
valueField: 'userName',
immediate: false,
resultField: 'data',
onChange: async (e, obj) => {
if (e && obj) {
formModel.saleId = obj.value
formModel.saleName = obj.label
formModel.saleId = obj.id
formModel.sale = obj.pinYinCode
}
if (!e && !obj) {
formModel.saleId = ''
formModel.saleName = ''
formModel.sale = ''
}
},
onEdit: () => {
@ -434,14 +440,14 @@ export const EditformSchema: FormSchema[] = [
},
},
{
label: '客服Name',
field: 'customerServiceName',
label: '客服ID',
field: 'customerService',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'customerService',
field: 'customerServiceName',
label: '客服',
component: 'DEdit',
colProps: { span: 4 },
@ -449,16 +455,18 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => {
const { formModel } = e
return {
options: CustomerServiceList,
api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
immediate: false,
resultField: 'data',
onChange: async (e, obj) => {
if (e && obj) {
formModel.customerService = obj.value
formModel.customerServiceName = obj.label
formModel.customerService = obj.id
formModel.customerServiceName = obj.pinYinCode
}
if (!e && !obj) {
formModel.customerService = ''
@ -474,13 +482,13 @@ export const EditformSchema: FormSchema[] = [
},
{
label: '操作人Name',
field: 'operatorName',
field: 'operatorId',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'operatorId',
field: 'operatorName',
label: '操作人',
component: 'DEdit',
colProps: { span: 4 },
@ -488,16 +496,18 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => {
const { formModel } = e
return {
options: OperatorUserList,
api: GetOperatorUserList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
formModel.operatorId = obj.value
formModel.operatorName = obj.label
formModel.operatorId = obj.id
formModel.operatorName = obj.pinYinCode
}
if (!e && !obj) {
formModel.operatorId = ''
@ -513,13 +523,13 @@ export const EditformSchema: FormSchema[] = [
},
{
label: '单证Name',
field: 'docName',
field: 'doc',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'doc',
field: 'docName',
label: '单证',
component: 'DEdit',
colProps: { span: 4 },
@ -527,16 +537,16 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => {
const { formModel } = e
return {
options: VouchingClerkList,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
api: GetVouchingClerkList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
immediate: false,
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
formModel.doc = obj.value
formModel.docName = obj.label
formModel.doc = obj.id
formModel.docName = obj.pinYinCode
}
if (!e && !obj) {
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" />
</div>
</a-tab-pane>
<!-- <a-tab-pane key="3" tab="费用模板">
<FeeCustTemplate :client-id="clientId" class="RUnit" />
</a-tab-pane> -->
<!-- 联系人信息 -->
<a-tab-pane key="4" tab="联系人信息">
<Menus2 :client-id="clientId" class="RUnit" />
@ -192,7 +189,6 @@
import Menus2 from './menu2/index.vue'
import Menus3 from './menu3/index.vue'
import CustTemplateDetail from './custTemplateDetail/index.vue'
import FeeCustTemplate from './FeeCustTemplate/index.vue'
import { useModal } from '/@/components/Modal'
import CustomerParams from './customerParams/index.vue'
import ReleaseType from './ReleaseType/index.vue'
@ -226,7 +222,7 @@
const { data } = res
if (data && data.length) {
const content = JSON.parse(data[0].content).columns
await updateSchema(content)
updateSchema(content)
DIYformSchema.value = content
}
}
@ -425,21 +421,12 @@
//
function addboxLine(record) {
openModal(true, {
// clientId: props.clientId,
record,
isUpdate: false,
})
// const data = {
// rowKey: dataSource.value.length
// ? dataSource.value[dataSource.value.length - 1].rowKey + 1
// : 1,
// }
// setTableData([...getDataSource(), data])
}
//
function editboxLine(record) {
// go(`/infoclientDetail?id=${row.id}`)
openModal(true, {
record,
isUpdate: true,

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

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

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

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

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