From d89952bc9e0db63ec794eddef52d85c778e81a61 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Wed, 20 Nov 2024 10:55:12 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E8=81=94=E7=B3=BB=E4=BA=BA=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 +- src/components/CostEntry/feeTable.vue | 34 +- src/design/ant/table.less | 3 + src/views/baseinfo/goodstype/columns.tsx | 6 + src/views/baseinfo/goodstype/index.vue | 87 +-- .../operation/seaexport/detail/index.vue | 23 +- .../detail/modules/Letter/LetterApi.js | 9 + .../modules/Letter/OpBusinessYardEdit.vue | 7 +- .../seaexport/detail/modules/PersonModal.vue | 157 ----- .../seaexport/detail/modules/baseInfo.tsx | 598 +++++++++--------- .../seaexport/detail/modules/basicInfo.vue | 6 +- .../seaexport/detail/modules/cargoInfo.vue | 4 + .../seaexport/detail/modules/contactList.vue | 376 ++++++++--- .../seaexport/detail/modules/goodsTable.vue | 1 + .../seaexport/detail/modules/otherInfo.vue | 3 + yarn.lock | 16 +- 16 files changed, 697 insertions(+), 637 deletions(-) delete mode 100644 src/views/operation/seaexport/detail/modules/PersonModal.vue diff --git a/package.json b/package.json index 553ee5dc..28e40fb4 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@ant-design/colors": "^6.0.0", "@ant-design/icons-vue": "^6.1.0", "@element-plus/icons-vue": "^2.3.1", - "@handsontable/vue3": "^14.5.0", + "@handsontable/vue3": "^14.6.1", "@iconify/iconify": "^2.2.1", "@logicflow/core": "^1.1.13", "@logicflow/extension": "^1.1.13", @@ -56,7 +56,7 @@ "echarts": "^5.3.2", "element-plus": "^2.3.12", "exceljs": "^4.3.0", - "handsontable": "^14.5.0", + "handsontable": "^14.6.1", "intro.js": "^5.1.0", "lodash": "^4.17.21", "lodash-es": "^4.17.21", diff --git a/src/components/CostEntry/feeTable.vue b/src/components/CostEntry/feeTable.vue index 9d3520fe..562193d5 100644 --- a/src/components/CostEntry/feeTable.vue +++ b/src/components/CostEntry/feeTable.vue @@ -601,7 +601,7 @@ return changes[0][3].includes(item.name) }) if (item) dict = item[0] - console.log(dict) + if (!dict?.id) return list.value[changes[0][0]]['feeName'] = changes[0][3].split('-')[1] list.value[changes[0][0]]['feeId'] = dict['id'] list.value[changes[0][0]]['feeEnName'] = dict['enName'] @@ -728,7 +728,7 @@ return changes[0][3].includes(item.name) }) if (item) dict = item[0] - console.log(dict) + if (!dict?.value) return false list.value[changes[0][0]]['unit'] = dict?.value if (changes[0][3].indexOf('-') > -1) { changes[0][3] = changes[0][3].split('-')[0] @@ -1117,7 +1117,7 @@ exchangeRateList = res.data }) } - const editKeyCode = [33, 34, 35, 36, 37, 38, 39, 40, 46, 16 ,17, 18] + const editKeyCode = [37, 38, 39, 40, 9] // 增加行 const add = () => { const hot = hotTb.value.hotInstance @@ -1136,6 +1136,14 @@ hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {}) // 定义表格按键处理逻辑 hot.addHook('beforeKeyDown', function (event) { + // 处理中午输入法第一个字母失效的问题 + // if (editKeyCode.includes(event.keyCode)) { + // if (hot.getActiveEditor()?.beginEditing) { + // setTimeout(() => { + // hot.getActiveEditor().beginEditing() + // }, 50) + // } + // } // 检查按下的是否是特定的键(例如 'Enter') if (event.key === 'ArrowDown') { if (hot.getSelected()[0][0] == list.value.length - 1 && !hot.getActiveEditor()?._opened) { @@ -1175,27 +1183,7 @@ } // 数据初始化 if (props.isShowBtn) init() - // 处理输入法第一个字母失效 - // document.addEventListener('keyup', handKeyUp, false) - // document.addEventListener('mousedown', handKeyDown, false) }) - // const handKeyUp = (event) => { - // if (editKeyCode.indexOf(event.keyCode) > -1) { - // console.log(222) - // hotTb.value.hotInstance.removeHook('afterSelectionEnd', afterSelect) - // } else { - // console.log(666) - // hotTb.value.hotInstance.addHook('afterSelectionEnd', afterSelect) - // } - // } - // const handKeyDown = (event) => { - // console.log(333) - // hotTb.value.hotInstance.removeHook('afterSelectionEnd', afterSelect) - // } - // const afterSelect = () => { - // console.log(555) - // hotTb.value.hotInstance.getActiveEditor().beginEditing() - // } // 实时更新表格列 const updateCol = (list) => { hotTb.value.hotInstance.updateSettings({ diff --git a/src/design/ant/table.less b/src/design/ant/table.less index eb5bb713..30bcd9ce 100644 --- a/src/design/ant/table.less +++ b/src/design/ant/table.less @@ -163,6 +163,9 @@ } // handsontable 全选checkbox .handsontable { + .area::before { + background-color: #ffffff; + } >img { position: absolute; top: 50%; diff --git a/src/views/baseinfo/goodstype/columns.tsx b/src/views/baseinfo/goodstype/columns.tsx index 5cca2df4..de883d02 100644 --- a/src/views/baseinfo/goodstype/columns.tsx +++ b/src/views/baseinfo/goodstype/columns.tsx @@ -6,12 +6,14 @@ export const columns: BasicColumn[] = [ dataIndex: 'goodsTypeCode', sorter: true, width: 150, + align: 'left' }, { title: '商品类型名称', dataIndex: 'goodsTypeName', sorter: true, width: 200, + align: 'left' }, // { // title: '英文名称', @@ -23,6 +25,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'description', sorter: true, width: 200, + align: 'left' }, { title: '是否启用', @@ -37,18 +40,21 @@ export const columns: BasicColumn[] = [ } return text }, + align: 'left' }, { title: '备注', dataIndex: 'note', sorter: true, width: 150, + align: 'left' }, { title: '创建时间', dataIndex: 'createTime', sorter: true, width: 200, + align: 'left' }, ] export const searchFormSchema: FormSchema[] = [ diff --git a/src/views/baseinfo/goodstype/index.vue b/src/views/baseinfo/goodstype/index.vue index f80dd6d5..92154652 100644 --- a/src/views/baseinfo/goodstype/index.vue +++ b/src/views/baseinfo/goodstype/index.vue @@ -2,49 +2,49 @@
+ - @@ -129,10 +129,13 @@ width: 60, }, canResize: true, - resizeHeightOffset: 35, + resizeHeightOffset: 15, immediate: true, + tableComponent: 'vxe', + id: '0', + autoHeight: window.innerHeight - 250, actionColumn: { - width: 80, + width: 50, title: '操作', dataIndex: 'action', fixed: 'right', diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 8c234b4c..f7bad68a 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -84,7 +84,8 @@
- + + @@ -493,6 +494,7 @@ }) } } + const contactList = ref(null) // 点击保存 const save = async (task) => { // 基础信息表单数据 @@ -578,6 +580,11 @@ }) serviceItem = String(codes) } + // 清除约号前后的空格 + if (baseinfoForm.contractNo) { + baseinfoForm.contractNo = baseinfoForm.contractNo.replace(/^\s+|\s+$/g, '') + console.log(baseinfoForm.contractNo) + } // 提交的post数据 const postData = { ...baseinfoForm, @@ -589,6 +596,7 @@ ...noteForm, ediInfo: ediFrom, ctnInfo, + orderContacts: contactList.value.getDataSource(), soRemark: ediFrom.soRemark, closeDocRemark: ediFrom.closeDocRemark, serviceItem @@ -932,6 +940,7 @@ } // 提交审核 const submit = async () => { + await save(null) // 委托单位、订舱口、国内发货人、报关行、车队、国外发货人有值时,校验联系人必填 const data = bookingDetails.value if (data.customerName) { @@ -949,8 +958,6 @@ if (p.length == 0) { return createMessage.warning('请完善国内发货人联系人信息!') } - console.log(data.orderContactList) - console.log(p) } if (data.forwarder) { const p = data.orderContactList.filter(item => { @@ -1143,11 +1150,11 @@ RefmailingInfo.value.$data.userHasLine = !!bookingDetails.value.lineName } } - // 获取基础信息表单数据 - const getBaseInfo = () => { - const data = RefbasicInfo.value.getFieldsValue() - emitter.emit('sendBaseInfo', data) - } + // // 获取基础信息表单数据 + // const getBaseInfo = () => { + // const data = RefbasicInfo.value.getFieldsValue() + // emitter.emit('sendBaseInfo', data) + // } function changeTab(e) { tabActiveKey.value = e // setTimeout(() => { diff --git a/src/views/operation/seaexport/detail/modules/Letter/LetterApi.js b/src/views/operation/seaexport/detail/modules/Letter/LetterApi.js index faa5f2bc..d25c6dd9 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/LetterApi.js +++ b/src/views/operation/seaexport/detail/modules/Letter/LetterApi.js @@ -141,3 +141,12 @@ export function BatchDelTruckCtns(parameter) { data: parameter, }) } + +// 一键放舱邮件发送 +export function OneKeySendLetterYard(parameter) { + return request({ + url: '/opApi/OpBusinessYard/OneKeySendLetterYard', + method: 'post', + data: parameter, + }) +} diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue index 7615a8fd..75a4504c 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue @@ -49,7 +49,7 @@ // 邮件发送组件 import EmailModal from '/@/components/EmailModal/index.vue' import { formSchema, historyColumns } from './OpBusinessYardColumns' - import { EditOpBusinessYard, GetOpBusinessYardInfo, BatchDelOpBusinessYard, GetYardHistoryList } from './LetterApi' + import { EditOpBusinessYard, GetOpBusinessYardInfo, BatchDelOpBusinessYard, GetYardHistoryList, OneKeySendLetterYard } from './LetterApi' import { useMessage } from '/@/hooks/web/useMessage' import { useUserStore } from '/@/store/modules/user' import { propTypes } from '/@/utils/propTypes' @@ -193,8 +193,11 @@ } // 发送邮件 const sendEmail = () => { + console.log(props) // 发送邮件 - emailModal.value.init([], props.businessId) + OneKeySendLetterYard({ bookingId: props.businessId?.id }).then(res => { + console.log(res) + }) } defineExpose({ setFieldsValue diff --git a/src/views/operation/seaexport/detail/modules/PersonModal.vue b/src/views/operation/seaexport/detail/modules/PersonModal.vue deleted file mode 100644 index c7ad4e7f..00000000 --- a/src/views/operation/seaexport/detail/modules/PersonModal.vue +++ /dev/null @@ -1,157 +0,0 @@ - - diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index e1334317..c313f49c 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -1,7 +1,7 @@ // import { useComponentRegister } from '/@/components/Form' // import CtnPrice from './ctnPrice.vue' // useComponentRegister('CtnPrice', CtnPrice) -import { ref, unref } from 'vue' +import { ref, unref, nextTick } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' import { getDictOption } from '/@/utils/dictUtil' // 下拉框数据接口 @@ -14,7 +14,6 @@ import { } from '/@/api/common' import { GetPackageSelectList, - GetOrderContactListByClientId, GetShippingBillTemplateSelectList, GetClientPortSelectList, GetClientFrtSelectList, @@ -144,11 +143,11 @@ export const basicInfoFormSchema: FormSchema[] = [ immediate: false, onChange: (e, obj) => { if (e && obj) { - setTimeout(() => { + nextTick(() => { formActionType ? formActionType.linkageForm({ key: 'customerName', value: obj }) : null - }, 10) + }) formModel.customerId = obj.id } if (!e && !obj) { @@ -178,7 +177,7 @@ export const basicInfoFormSchema: FormSchema[] = [ required: false, dynamicDisabled: false, colProps: { span: 5 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetClientListByCode, params: { code: 'shippercn' }, @@ -190,6 +189,9 @@ export const basicInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.shipperCnId = obj.id + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'contact', data: { key: 'shippercn', value: obj }}) : null + }) } if (!e && !obj) { formModel.shipperCnId = null @@ -303,7 +305,9 @@ export const basicInfoFormSchema: FormSchema[] = [ immediate: false, onChange: (e, obj) => { if (e && obj) { - formActionType ? formActionType.linkageForm({ key: 'carrier' }) : null + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'carrier' }) : null + }) formModel.carrierId = obj.id } if (!e && !obj) { @@ -332,7 +336,7 @@ export const basicInfoFormSchema: FormSchema[] = [ defaultValue: null, dynamicDisabled: false, colProps: { span: 5 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetSupplierListByCode, params: { code: 'booking' }, @@ -344,6 +348,9 @@ export const basicInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.forwarderId = obj.id + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'contact', data: { key: 'booking', value: obj }}) : null + }) } if (!e && !obj) { formModel.forwarderId = '' @@ -384,15 +391,15 @@ export const basicInfoFormSchema: FormSchema[] = [ } } }, - { - field: 'hblno', - label: '分提单号', - labelSlot: 'hblno', - component: 'Input', - required: false, - dynamicDisabled: false, - colProps: { span: 5 }, - }, + // { + // field: 'hblno', + // label: '分提单号', + // labelSlot: 'hblno', + // component: 'Input', + // required: false, + // dynamicDisabled: false, + // colProps: { span: 5 }, + // }, { field: 'goodsCompleteTime', label: '货好时间', @@ -404,15 +411,15 @@ export const basicInfoFormSchema: FormSchema[] = [ valueFormat: 'YYYY-MM-DD' } }, - { - field: 'bookingRemark', - label: '订舱备注', - component: 'Input', - required: false, - dynamicDisabled: false, - // defaultValue: '', - colProps: { span: 14 }, - }, + // { + // field: 'bookingRemark', + // label: '订舱备注', + // component: 'Input', + // required: false, + // dynamicDisabled: false, + // // defaultValue: '', + // colProps: { span: 14 }, + // }, // { // field: 'accountDate', // label: '会计期间', @@ -2115,11 +2122,13 @@ export const cargoInfoFormSchema2: FormSchema[] = [ { label: '毛重', field: 'kgs', + labelSlot: 'kgs', component: 'InputNumber', required: false, colProps: { span: 12 }, componentProps: ({ formActionType }) => { return { + addonAfter: "KGS", onChange: () => { formActionType ? formActionType.submit() : null }, @@ -2129,9 +2138,13 @@ export const cargoInfoFormSchema2: FormSchema[] = [ { label: '尺码', field: 'cbm', + labelSlot: 'cbm', component: 'InputNumber', required: false, colProps: { span: 12 }, + componentProps: { + addonAfter: "CBM" + } }, ] export const cargoInfoFormSchema3: FormSchema[] = [ @@ -2754,7 +2767,7 @@ export const otherInfoFormSchema: FormSchema[] = [ required: false, dynamicDisabled: false, colProps: { span: 12 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetSupplierListByCode, params: { code: 'truck' }, @@ -2766,6 +2779,9 @@ export const otherInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.truckerId = obj.id + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'contact', data: { key: 'truck', value: obj }}) : null + }) } if (!e && !obj) { formModel.truckerId = '' @@ -2788,7 +2804,7 @@ export const otherInfoFormSchema: FormSchema[] = [ dynamicDisabled: false, // defaultValue: '', colProps: { span: 12 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetSupplierListByCode, params: { code: 'agent' }, @@ -2800,6 +2816,9 @@ export const otherInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.agentId = obj.id + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'contact', data: { key: 'agent', value: obj }}) : null + }) } if (!e && !obj) { formModel.agentId = '' @@ -2817,7 +2836,7 @@ export const otherInfoFormSchema: FormSchema[] = [ dynamicDisabled: false, // defaultValue: '', colProps: { span: 12 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetSupplierListByCode, params: { code: 'yard' }, @@ -2829,6 +2848,9 @@ export const otherInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.yardId = obj.id + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'contact', data: { key: 'yard', value: obj }}) : null + }) } if (!e && !obj) { formModel.yardId = '' @@ -2887,7 +2909,7 @@ export const otherInfoFormSchema: FormSchema[] = [ dynamicDisabled: false, // defaultValue: '', colProps: { span: 12 }, - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: GetSupplierListByCode, params: { code: 'custom' }, @@ -2899,6 +2921,9 @@ export const otherInfoFormSchema: FormSchema[] = [ onChange: (e, obj) => { if (e && obj) { formModel.customserId = obj.id + nextTick(() => { + formActionType ? formActionType.linkageForm({ key: 'contact', data: { key: 'custom', value: obj }}) : null + }) } if (!e && !obj) { formModel.customserId = '' @@ -3001,288 +3026,237 @@ export const otherInfoFormSchema: FormSchema[] = [ ] // 客户类别下拉框数据 -const customTypeDict = ref([]) -const personList = ref([]) -getDictOption('infoclient-ArrclientTag').then((data) => { - customTypeDict.value = data -}) -// 关系人表单 -export const personFormSchema: FormSchema[] = [ - { - field: 'id', - label: '', - component: 'Input', - show: false, - }, - { - field: 'customerType', - label: '客户类型', - component: 'Select', - colProps: { span: 12 }, - componentProps: ({ formModel, formActionType }) => { - return { - options: customTypeDict.value, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (v: string, obj) => { - if (obj) { - formModel.customerTypeName = obj.label - } else { - // 情况联系人和 - formModel.customerTypeName = '' - } - formModel.customerContactId = '' - formModel.name = '' - formModel.email = '' - formModel.tel = '' - formActionType ? formActionType.linkageForm({ key: 'customerType', value: v }) : null - }, - } - }, - }, - { - field: 'customerName', - label: '客户名称', - component: 'ApiSelect', - required: false, - dynamicDisabled: false, - colProps: { span: 12 }, - componentProps: ({ formModel }) => { - return { - api: GetClientListByCode, - params: { code: formModel.customerType }, - labelField: 'pinYinCode', - valueField: 'shortName', - showName: 'shortName', - resultField: 'data', - immediate: false, - onChange: (e, obj) => { - if (e && obj) { - formModel.customerId = obj.id - formModel.name = null - formModel.customerContactId = null - formModel.email = '' - formModel.tel = '' - } - if (!e && !obj) { - formModel.customerId = '' - } - setTimeout(() => { - if (e && formModel.customerId) { - // 设置关系人下拉 - GetOrderContactListByClientId({ id: formModel.customerId }).then((res) => { - personList.value = res.data.map((item) => { - return { - label: item.name, - value: item.name, - id: item.id, - email: item.email, - mobile: item.mobile, - tel: item.tel - } - }) - }) - } - }, 50) - if (e == null) { - personList.value = [] - } - } - } - } - }, - // { - // field: 'customerName', - // label: '客户名称', - // defaultValue: null, - // component: 'ApiSelect', - // colProps: { span: 12 }, - // componentProps: ({ formModel }) => { - // return { - // api: GetClientListByCode, - // params: { code: formModel.customerType }, - // labelField: 'pinYinCode', - // showName: 'shortName', - // valueField: 'shortName', - // immediate: false, - // onChange: (v, obj) => { - // if (obj) { - // formModel.name = null - // formModel.customerId = obj.id - // formModel.customerContactId = null - // formModel.email = '' - // formModel.tel = '' - // // 设置关系人下拉 - // GetOrderContactListByClientId({ id: obj.id }).then((res) => { - // personList.value = res.data.map((item) => { - // return { - // label: item.name, - // value: item.id, - // email: item.email, - // mobile: item.mobile, - // } - // }) - // }) - // } - // } - // } - // } - // }, - { - field: 'customerId', - label: '', - component: 'Input', - show: false, - }, - { - field: 'name', - label: '联系人', - component: 'Select', - required: false, - dynamicDisabled: false, - colProps: { span: 12 }, - componentProps: ({ formModel, formActionType }) => { - return { - options: personList.value, - mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE', - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (v, obj) => { - if (v && obj) { - formModel.customerContactId = obj.id - formModel.email = obj.email - formModel.tel = obj.tel - formModel.mobile = obj.mobile - } - if (!v && (!obj || obj == {})) { - formModel.customerContactId = null - formModel.email = null - formModel.mobile = null - formModel.tel = null - } - }, - } - }, - }, - { - label: '职位', - field: 'job', - component: 'Input', - colProps: { span: 12 } - }, - { - field: 'customerContactId', - label: '', - component: 'Input', - show: false, - }, - { - label: '邮箱', - field: 'email', - component: 'Input', - colProps: { span: 12 }, - required: true, - rules: [{ type: 'email', message: '请填写正确的邮箱地址' }], - }, - { - label: '电话', - field: 'tel', - component: 'Input', - required: false, - colProps: { span: 12 } - }, - { - label: '手机', - field: 'mobile', - component: 'Input', - rules: [ - { - pattern: /^1\d{10}$/, - message: '请输入正确格式的手机号', - trigger: 'blur' - } - ], - colProps: { span: 12 } - }, - { - field: 'customerTypeName', - label: '', - defaultValue: '', - component: 'Input', - show: false, - colProps: { span: 24 }, - }, - { - field: 'note', - label: '备注', - defaultValue: '', - component: 'InputTextArea', - colProps: { span: 24 }, - componentProps: { - autoSize: { - minRows: 10, - }, - }, - }, -] - -// 关系人表格 -export const personColumns: BasicColumn[] = [ - { - dataIndex: 'customerTypeName', - title: '客户类别', - sorter: true, - width: 120, - }, - { - dataIndex: 'name', - title: '联系人', - sorter: true, - width: 90, - }, - { - dataIndex: 'email', - title: '邮箱', - sorter: true, - width: 150, - }, - { - dataIndex: 'tel', - title: '电话', - sorter: true, - width: 120, - }, - { - dataIndex: 'mobile', - title: '手机', - sorter: true, - width: 120, - }, - { - dataIndex: 'customerName', - title: '往来单位', - sorter: true, - width: 140, - }, - { - dataIndex: 'job', - title: '职位', - sorter: true, - width: 80, - }, - { - dataIndex: 'note', - title: '备注', - sorter: true, - width: 220, - }, -] +// const customTypeDict = ref([]) +// const personList = ref([]) +// getDictOption('infoclient-ArrclientTag').then((data) => { +// customTypeDict.value = data +// console.log(customTypeDict.value) +// }) +// // 关系人表单 +// export const personFormSchema: FormSchema[] = [ +// { +// field: 'id', +// label: '', +// component: 'Input', +// show: false, +// }, +// { +// field: 'customerType', +// label: '客户类型', +// component: 'Select', +// colProps: { span: 12 }, +// componentProps: ({ formModel, formActionType }) => { +// return { +// options: customTypeDict.value, +// allowClear: true, +// showSearch: true, +// filterOption: (input: string, option: any) => { +// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 +// }, +// onChange: (v: string, obj) => { +// if (obj) { +// formModel.customerTypeName = obj.label +// } else { +// // 情况联系人和 +// formModel.customerTypeName = '' +// } +// formModel.customerContactId = '' +// formModel.name = '' +// formModel.email = '' +// formModel.tel = '' +// // formActionType ? formActionType.linkageForm({ key: 'customerType', value: v }) : null +// }, +// } +// }, +// }, +// { +// field: 'customerName', +// label: '客户名称', +// component: 'ApiSelect', +// required: false, +// dynamicDisabled: false, +// colProps: { span: 12 }, +// componentProps: ({ formModel }) => { +// return { +// api: GetClientListByCode, +// params: { code: formModel.customerType }, +// labelField: 'pinYinCode', +// valueField: 'shortName', +// showName: 'shortName', +// resultField: 'data', +// immediate: false, +// onChange: (e, obj) => { +// if (e && obj) { +// formModel.customerId = obj.id +// formModel.name = null +// formModel.customerContactId = null +// formModel.email = '' +// formModel.tel = '' +// } +// if (!e && !obj) { +// formModel.customerId = '' +// } +// setTimeout(() => { +// if (e && formModel.customerId) { +// // 设置关系人下拉 +// GetOrderContactListByClientId({ id: formModel.customerId }).then((res) => { +// personList.value = res.data.map((item) => { +// return { +// label: item.name, +// value: item.name, +// id: item.id, +// email: item.email, +// mobile: item.mobile, +// tel: item.tel +// } +// }) +// }) +// } +// }, 50) +// if (e == null) { +// personList.value = [] +// } +// } +// } +// } +// }, +// // { +// // field: 'customerName', +// // label: '客户名称', +// // defaultValue: null, +// // component: 'ApiSelect', +// // colProps: { span: 12 }, +// // componentProps: ({ formModel }) => { +// // return { +// // api: GetClientListByCode, +// // params: { code: formModel.customerType }, +// // labelField: 'pinYinCode', +// // showName: 'shortName', +// // valueField: 'shortName', +// // immediate: false, +// // onChange: (v, obj) => { +// // if (obj) { +// // formModel.name = null +// // formModel.customerId = obj.id +// // formModel.customerContactId = null +// // formModel.email = '' +// // formModel.tel = '' +// // // 设置关系人下拉 +// // GetOrderContactListByClientId({ id: obj.id }).then((res) => { +// // personList.value = res.data.map((item) => { +// // return { +// // label: item.name, +// // value: item.id, +// // email: item.email, +// // mobile: item.mobile, +// // } +// // }) +// // }) +// // } +// // } +// // } +// // } +// // }, +// { +// field: 'customerId', +// label: '', +// component: 'Input', +// show: false, +// }, +// { +// field: 'name', +// label: '联系人', +// component: 'Select', +// required: false, +// dynamicDisabled: false, +// colProps: { span: 12 }, +// componentProps: ({ formModel, formActionType }) => { +// return { +// options: personList.value, +// mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE', +// allowClear: true, +// showSearch: true, +// filterOption: (input: string, option: any) => { +// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 +// }, +// onChange: (v, obj) => { +// if (v && obj) { +// formModel.customerContactId = obj.id +// formModel.email = obj.email +// formModel.tel = obj.tel +// formModel.mobile = obj.mobile +// } +// if (!v && (!obj || obj == {})) { +// formModel.customerContactId = null +// formModel.email = null +// formModel.mobile = null +// formModel.tel = null +// } +// } +// } +// }, +// }, +// { +// label: '职位', +// field: 'job', +// component: 'Input', +// colProps: { span: 12 } +// }, +// { +// field: 'customerContactId', +// label: '', +// component: 'Input', +// show: false, +// }, +// { +// label: '邮箱', +// field: 'email', +// component: 'Input', +// colProps: { span: 12 }, +// required: true, +// rules: [{ type: 'email', message: '请填写正确的邮箱地址' }], +// }, +// { +// label: '电话', +// field: 'tel', +// component: 'Input', +// required: false, +// colProps: { span: 12 } +// }, +// { +// label: '手机', +// field: 'mobile', +// component: 'Input', +// rules: [ +// { +// pattern: /^1\d{10}$/, +// message: '请输入正确格式的手机号', +// trigger: 'blur' +// } +// ], +// colProps: { span: 12 } +// }, +// { +// field: 'customerTypeName', +// label: '', +// defaultValue: '', +// component: 'Input', +// show: false, +// colProps: { span: 24 }, +// }, +// { +// field: 'note', +// label: '备注', +// defaultValue: '', +// component: 'InputTextArea', +// colProps: { span: 24 }, +// componentProps: { +// autoSize: { +// minRows: 10, +// }, +// }, +// }, +// ] // 海运出口基础信息总表单 export const basicInfoFormAllSchema: FormSchema[] = [ @@ -3505,7 +3479,7 @@ export const aiForm: FormSchema[] = [ return { api: GetCarrierSelectList, labelField: 'pinYinCode', - showName: 'description', + showName: 'code', valueField: 'ediCode', resultField: 'data', immediate: false, diff --git a/src/views/operation/seaexport/detail/modules/basicInfo.vue b/src/views/operation/seaexport/detail/modules/basicInfo.vue index 7a18c7c0..e8b7b632 100644 --- a/src/views/operation/seaexport/detail/modules/basicInfo.vue +++ b/src/views/operation/seaexport/detail/modules/basicInfo.vue @@ -151,7 +151,6 @@ import { useRoute } from 'vue-router' import { Divider } from 'ant-design-vue' import { useUserStore } from '/@/store/modules/user' -import { mode } from 'crypto-js' const userStore = useUserStore() const route = useRoute() // 判断页面来源 @@ -279,12 +278,15 @@ import { mode } from 'crypto-js' emitter.emit('seaAddNotes', item.value) } else if (item.key == 'customerName') { // 新建页面直接返回 - if (!props?.details?.id) return + // if (!props?.details?.id) return // 修改委托单位带出值 emitter.emit('customerBack', item.value) } else if (item.key == 'carrier') { // 如果是改配,并且修改船公司,情况提单号,约主约号,船名航次 emits('changeClear') + } else if (item.key == 'contact') { + // 如果是需要点出联系人,联动联系人信息 + emitter.emit('contactPerson', item.data) } } watch( diff --git a/src/views/operation/seaexport/detail/modules/cargoInfo.vue b/src/views/operation/seaexport/detail/modules/cargoInfo.vue index fcb73043..e73a7ee0 100644 --- a/src/views/operation/seaexport/detail/modules/cargoInfo.vue +++ b/src/views/operation/seaexport/detail/modules/cargoInfo.vue @@ -719,6 +719,10 @@ diff --git a/src/logics/theme/dark.ts b/src/logics/theme/dark.ts index aae2cd11..76d8d66d 100644 --- a/src/logics/theme/dark.ts +++ b/src/logics/theme/dark.ts @@ -1,3 +1,8 @@ +/* + * @Desc: + * @Author: lijj + * @Date: 2024-05-13 09:06:51 + */ import { darkCssIsReady, loadDarkThemeCss } from 'vite-plugin-theme/es/client' import { addClass, hasClass, removeClass } from '/@/utils/domUtils' @@ -11,14 +16,14 @@ export async function updateDarkTheme(mode: string | null = 'light') { if (import.meta.env.PROD && !darkCssIsReady) { await loadDarkThemeCss() } - htmlRoot.setAttribute('data-theme', 'dark') if (!hasDarkClass) { addClass(htmlRoot, 'dark') } } else { - htmlRoot.setAttribute('data-theme', 'light') if (hasDarkClass) { removeClass(htmlRoot, 'dark') } } + console.log(111111111111) + htmlRoot.setAttribute('data-theme', mode) } diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index c313f49c..6339ceb8 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -411,15 +411,15 @@ export const basicInfoFormSchema: FormSchema[] = [ valueFormat: 'YYYY-MM-DD' } }, - // { - // field: 'bookingRemark', - // label: '订舱备注', - // component: 'Input', - // required: false, - // dynamicDisabled: false, - // // defaultValue: '', - // colProps: { span: 14 }, - // }, + { + field: 'bookingRemark', + label: '订舱备注', + component: 'Input', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 14 }, + }, // { // field: 'accountDate', // label: '会计期间', From 28d651046c25b0c43c87eaa80983bdf06513ef32 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Tue, 26 Nov 2024 13:38:32 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E8=BF=AD=E4=BB=A3vxe=E8=A1=A8=E6=A0=BCtab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/logics/theme/dark.ts | 1 - src/views/baseinfo/formcopy/components/Modal copy.vue | 1 - src/views/baseinfo/formcopy/components/Modal.vue | 1 - 3 files changed, 3 deletions(-) diff --git a/src/logics/theme/dark.ts b/src/logics/theme/dark.ts index 76d8d66d..16bbb568 100644 --- a/src/logics/theme/dark.ts +++ b/src/logics/theme/dark.ts @@ -24,6 +24,5 @@ export async function updateDarkTheme(mode: string | null = 'light') { removeClass(htmlRoot, 'dark') } } - console.log(111111111111) htmlRoot.setAttribute('data-theme', mode) } diff --git a/src/views/baseinfo/formcopy/components/Modal copy.vue b/src/views/baseinfo/formcopy/components/Modal copy.vue index 906dd17f..729f2b91 100644 --- a/src/views/baseinfo/formcopy/components/Modal copy.vue +++ b/src/views/baseinfo/formcopy/components/Modal copy.vue @@ -152,7 +152,6 @@ setModalProps({ confirmLoading: false, loading: true }) isUpdate.value = !!data?.isUpdate await init() - console.log(unref(isUpdate), 11111111111111111) if (unref(isUpdate)) { rowId.value = data.record.id diff --git a/src/views/baseinfo/formcopy/components/Modal.vue b/src/views/baseinfo/formcopy/components/Modal.vue index 61560c21..df6389ac 100644 --- a/src/views/baseinfo/formcopy/components/Modal.vue +++ b/src/views/baseinfo/formcopy/components/Modal.vue @@ -195,7 +195,6 @@ formLoading.value = true isUpdate.value = !!data?.isUpdate await init() - console.log(unref(isUpdate), 11111111111111111) if (unref(isUpdate)) { rowId.value = data.record.id