diff --git a/src/api/common/index.ts b/src/api/common/index.ts index 4cc8c0dd..4a5bfb34 100644 --- a/src/api/common/index.ts +++ b/src/api/common/index.ts @@ -204,10 +204,11 @@ export function getCustomerServiceList() { method: 'get', }) } -export function getSaleUserList() { +export function getSaleUserList(query) { return request({ url: Api.getSaleUserList, method: 'get', + params: query, }) } export function getVouchingClerkList() { diff --git a/src/views/baseinfo/infoclient/ClientAccountDateModal.vue b/src/views/baseinfo/infoclient/ClientAccountDateModal.vue index 96a7a374..43aa6da5 100644 --- a/src/views/baseinfo/infoclient/ClientAccountDateModal.vue +++ b/src/views/baseinfo/infoclient/ClientAccountDateModal.vue @@ -8,6 +8,42 @@ @ok="handleSave" > +
+
+ + + 新增 + + + + + 删除 + + +
+
+ + + + +
+
diff --git a/src/views/baseinfo/infoclient/EditColumns.tsx b/src/views/baseinfo/infoclient/EditColumns.tsx index 59590d24..4244aa81 100644 --- a/src/views/baseinfo/infoclient/EditColumns.tsx +++ b/src/views/baseinfo/infoclient/EditColumns.tsx @@ -1,3 +1,4 @@ +import { ref } from 'vue' import { FormSchema } from '/@/components/Table' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() @@ -30,12 +31,12 @@ if (res11.succeeded) { OrgTree.push({ label: e.shortName, value: e.id }) }) } -let SaleUserList = [] +const SaleUserList = ref([]) const res8: API.DataResult = await getSaleUserList() if (res8.succeeded) { - SaleUserList = [] + SaleUserList.value.splice(0) res8.data.forEach((e) => { - SaleUserList.push({ label: e.userName, value: e.id }) + SaleUserList.value.push({ label: e.userName, value: e.id }) }) } let OperatorUserList = [] @@ -410,12 +411,12 @@ export const EditformSchema: FormSchema[] = [ componentProps: (e) => { const { formModel } = e return { - options: SaleUserList, + options: SaleUserList.value, allowClear: true, showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, onChange: (e, obj) => { if (e && obj) { formModel.saleId = obj.value @@ -426,6 +427,19 @@ export const EditformSchema: FormSchema[] = [ 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: () => { const { formActionType } = e formActionType ? formActionType.linkageForm(e) : null diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue deleted file mode 100644 index 143beef0..00000000 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue +++ /dev/null @@ -1,129 +0,0 @@ - - diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/api.ts b/src/views/baseinfo/infoclient/FeeCustTemplate/api.ts deleted file mode 100644 index 44baaa40..00000000 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/api.ts +++ /dev/null @@ -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({ - url: Api.list, - method: 'post', - data, - }) -} -// 编辑 (Auth) -export function ApiEdit(data: PageRequest) { - return request({ - url: Api.edit, - method: 'post', - data, - }) -} -// 详情 (Auth) -export function ApiInfo(query) { - return request({ - url: Api.info, - method: 'get', - params: query, - }) -} -// 批量删除 (Auth) -export function ApiDel(data: PageRequest) { - return request({ - url: Api.del, - method: 'post', - data, - }) -} \ No newline at end of file diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx deleted file mode 100644 index eed17be8..00000000 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx +++ /dev/null @@ -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, - }, - }, -] diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/index.vue b/src/views/baseinfo/infoclient/FeeCustTemplate/index.vue deleted file mode 100644 index ac40b079..00000000 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/index.vue +++ /dev/null @@ -1,148 +0,0 @@ - - - diff --git a/src/views/baseinfo/infoclient/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/TenantAuditStepModal.vue index f107b708..d87935b1 100644 --- a/src/views/baseinfo/infoclient/TenantAuditStepModal.vue +++ b/src/views/baseinfo/infoclient/TenantAuditStepModal.vue @@ -138,9 +138,6 @@ - @@ -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, diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 9c949a3f..5f86c115 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -26,6 +26,8 @@ import { } 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 +52,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 +68,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 +347,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: '社会信用代码', @@ -517,15 +559,12 @@ export const formSchema: FormSchema[] = [ { field: 'saleId', label: '揽货人', - component: 'ApiSelect', + component: 'Select', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - api: getSaleUserList, - resultField: 'data', - labelField: 'userName', - valueField: 'id', + options: SaleUserList, allowClear: true, showSearch: true, filterOption: (input: string, option: any) => { @@ -534,11 +573,11 @@ export const formSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.saleId = obj.value - formModel.sale = obj.label + formModel.saleName = obj.label } if (!e && !obj) { formModel.saleId = '' - formModel.sale = '' + formModel.saleName = '' } }, } @@ -553,14 +592,11 @@ export const formSchema: FormSchema[] = [ { field: 'customerService', label: '客服', - component: 'ApiSelect', + component: 'Select', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - api: getCustomerServiceList, - resultField: 'data', - labelField: 'userName', - valueField: 'id', + options: CustomerServiceList, allowClear: true, showSearch: true, filterOption: (input: string, option: any) => { @@ -589,14 +625,11 @@ export const formSchema: FormSchema[] = [ { field: 'operatorId', label: '操作人', - component: 'ApiSelect', + component: 'Select', colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - api: getOperatorUserList, - resultField: 'data', - labelField: 'userName', - valueField: 'id', + options: OperatorUserList, allowClear: true, showSearch: true, filterOption: (input: string, option: any) => { @@ -651,17 +684,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 +874,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 +990,7 @@ export const formSchema: FormSchema[] = [ }, { label: '服务项目', - field: 'notifications1', + field: 'serviceItemCodes', component: 'ApiSelect', colProps: { span: 12 }, componentProps: { @@ -1354,14 +1380,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 }, + // ], }, }, { diff --git a/src/views/baseinfo/infoclient/custTemplateDetail/Modal.vue b/src/views/baseinfo/infoclient/custTemplateDetail/Modal.vue index 41910335..40eca024 100644 --- a/src/views/baseinfo/infoclient/custTemplateDetail/Modal.vue +++ b/src/views/baseinfo/infoclient/custTemplateDetail/Modal.vue @@ -1,9 +1,9 @@