往来单位 调整

szh-new
张同海 3 months ago
parent ef96a76cfa
commit f5f6a30333

@ -204,10 +204,11 @@ export function getCustomerServiceList() {
method: 'get', method: 'get',
}) })
} }
export function getSaleUserList() { export function getSaleUserList(query) {
return request<DataResult>({ return request<DataResult>({
url: Api.getSaleUserList, url: Api.getSaleUserList,
method: 'get', method: 'get',
params: query,
}) })
} }
export function getVouchingClerkList() { export function getVouchingClerkList() {

@ -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>

@ -1,3 +1,4 @@
import { ref } from 'vue'
import { FormSchema } from '/@/components/Table' import { FormSchema } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -30,12 +31,12 @@ if (res11.succeeded) {
OrgTree.push({ label: e.shortName, value: e.id }) OrgTree.push({ label: e.shortName, value: e.id })
}) })
} }
let SaleUserList = [] const SaleUserList = ref([])
const res8: API.DataResult = await getSaleUserList() const res8: API.DataResult = await getSaleUserList()
if (res8.succeeded) { if (res8.succeeded) {
SaleUserList = [] SaleUserList.value.splice(0)
res8.data.forEach((e) => { res8.data.forEach((e) => {
SaleUserList.push({ label: e.userName, value: e.id }) SaleUserList.value.push({ label: e.userName, value: e.id })
}) })
} }
let OperatorUserList = [] let OperatorUserList = []
@ -410,12 +411,12 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: SaleUserList, options: SaleUserList.value,
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
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) => {
if (e && obj) { if (e && obj) {
formModel.saleId = obj.value formModel.saleId = obj.value
@ -426,6 +427,19 @@ export const EditformSchema: FormSchema[] = [
formModel.saleName = '' formModel.saleName = ''
} }
}, },
onSearch: (val) => {
console.log(val)
getSaleUserList({ queryKey: val }).then((res) => {
console.log(res)
res.data.forEach((item) => {
item.label = item.userName
item.value = item.id
})
SaleUserList.value = res.data
})
},
onEdit: () => { onEdit: () => {
const { formActionType } = e const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null formActionType ? formActionType.linkageForm(e) : null

@ -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,

@ -26,6 +26,8 @@ import {
} 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 +52,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 +68,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 +347,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: '社会信用代码',
@ -517,15 +559,12 @@ export const formSchema: FormSchema[] = [
{ {
field: 'saleId', field: 'saleId',
label: '揽货人', label: '揽货人',
component: 'ApiSelect', component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: getSaleUserList, options: SaleUserList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
@ -534,11 +573,11 @@ export const formSchema: FormSchema[] = [
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.saleId = obj.value formModel.saleId = obj.value
formModel.sale = obj.label formModel.saleName = obj.label
} }
if (!e && !obj) { if (!e && !obj) {
formModel.saleId = '' formModel.saleId = ''
formModel.sale = '' formModel.saleName = ''
} }
}, },
} }
@ -553,14 +592,11 @@ export const formSchema: FormSchema[] = [
{ {
field: 'customerService', field: 'customerService',
label: '客服', label: '客服',
component: 'ApiSelect', component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: getCustomerServiceList, options: CustomerServiceList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
@ -589,14 +625,11 @@ export const formSchema: FormSchema[] = [
{ {
field: 'operatorId', field: 'operatorId',
label: '操作人', label: '操作人',
component: 'ApiSelect', component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: getOperatorUserList, options: OperatorUserList,
resultField: 'data',
labelField: 'userName',
valueField: 'id',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
@ -651,17 +684,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 +874,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 +990,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 +1380,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"

Loading…
Cancel
Save