From 3f19a6f0cc2e54305a8e460625fe6f32575591d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Fri, 21 Jun 2024 17:57:25 +0800 Subject: [PATCH] 06/21 --- src/store/modules/configOptions.ts | 9 +- src/store/modules/options.ts | 2 + .../operation/seaexport/api/BookingLedger.js | 8 + .../modules/Letter/OpBusinessTruckColumns.tsx | 73 +++- .../Letter/OpBusinessTruckDetails copy.vue | 181 +++++++++ .../modules/Letter/OpBusinessTruckDetails.vue | 222 +++++------ .../Letter/OpBusinessTruckEdit copy.vue | 362 ++++++++++++++++++ .../modules/Letter/OpBusinessTruckEdit.vue | 206 +++++----- .../modules/Letter/OpBusinessYardColumns.tsx | 21 +- .../modules/Letter/OpBusinessYardDetails.vue | 226 +++++------ .../modules/Letter/OpBusinessYardEdit.vue | 143 ++----- 11 files changed, 948 insertions(+), 505 deletions(-) create mode 100644 src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails copy.vue create mode 100644 src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit copy.vue diff --git a/src/store/modules/configOptions.ts b/src/store/modules/configOptions.ts index 86182e19..dced4dee 100644 --- a/src/store/modules/configOptions.ts +++ b/src/store/modules/configOptions.ts @@ -18,7 +18,8 @@ import { GetClientFrtSelectList, GetServiceSelectList, GetPackageSelectList, - GetTruckClientList + GetTruckClientList, + GetDispatcherList, } from '/@/views/operation/seaexport/api/BookingLedger' import { GetFeeCurrencySelectList } from '/@/api/common/index' export default { @@ -118,4 +119,10 @@ export default { return res.data }) }, + //派车调度人员 + GetDispatcherList: () => { + return GetDispatcherList().then((res) => { + return res.data + }) + }, } diff --git a/src/store/modules/options.ts b/src/store/modules/options.ts index c02c6c10..a7d32564 100644 --- a/src/store/modules/options.ts +++ b/src/store/modules/options.ts @@ -42,6 +42,8 @@ export const useOptionsStore = defineStore({ GetFeeCurrencySelectList: null, // 币别 GetTruckClientList: null, + // 派车调度人员 + GetDispatcherList:null }), getters: { // 通过code获取下拉字典(code)就是接口尾部单词 diff --git a/src/views/operation/seaexport/api/BookingLedger.js b/src/views/operation/seaexport/api/BookingLedger.js index 07d6bed7..3e73c89a 100644 --- a/src/views/operation/seaexport/api/BookingLedger.js +++ b/src/views/operation/seaexport/api/BookingLedger.js @@ -404,6 +404,14 @@ export function GetSaleList(parameter) { params: parameter, }) } +// 获取派车调度人员列表 (Auth) +export function GetDispatcherList(parameter) { + return request({ + url: '/mainApi/ClientCommon/GetDispatcherList', + method: 'get', + params: parameter, + }) +} /** * 分页查询订舱主表 * @params PageSize diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx index 29040670..8930adfa 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form' useComponentRegister('Space', Space) const optionsStore = useOptionsStore() import { getOptions } from '/@/hooks/dict' +import { getDictOption } from '/@/utils/dictUtil' export const columns: BasicColumn[] = [ { title: '车队名称', @@ -427,10 +428,20 @@ export const formSchema: FormSchema[] = [ { label: '结算方式', field: 'payType', - component: 'Select', - defaultValue: '', - colProps: { - span: 6, + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + immediate: false, + option: optionsStore.getOptionsByCode('GetClientStlModeSelectList'), + labelField: 'stlName', + valueField: 'id', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } }, }, { @@ -605,12 +616,29 @@ export const formSchema: FormSchema[] = [ }, }, { - label: '派车状态', field: 'truckStatus', - component: 'Select', - defaultValue: '', - colProps: { - span: 6, + label: '派车状态', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: () => { + return { + allowClear: true, + showSearch: true, + api: () => { + return new Promise((resolve) => { + getDictOption('truck_status').then((res) => { + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } }, }, { @@ -769,12 +797,31 @@ export const formSchema: FormSchema[] = [ }, }, { - label: '调度人员名称', field: 'dispatcherId', - component: 'Select', + label: '调度人员名称', + component: 'ApiSelect', defaultValue: '', - colProps: { - span: 6, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + // style: 'width:100%', + allowClear: true, + showSearch: true, + option: optionsStore.getOptionsByCode('GetDispatcherList'), + labelField: 'userName', + valueField: 'id', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + if (obj) { + console.log(obj) + formModel.dispatcherName = obj.userName + } else { + formModel.dispatcherName = '' + } + }, + } }, }, { diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails copy.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails copy.vue new file mode 100644 index 00000000..f15a952b --- /dev/null +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails copy.vue @@ -0,0 +1,181 @@ + + + diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails.vue index f15a952b..c6b7f4fa 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckDetails.vue @@ -3,45 +3,38 @@ v-bind="$attrs" :use-wrapper="true" title="派车信息" - width="70%" + width="90%" @register="registerModal" > - - - - - - + + + + + + + + + + + @@ -49,7 +42,7 @@ diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit copy.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit copy.vue new file mode 100644 index 00000000..da26db54 --- /dev/null +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit copy.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue index da26db54..06b82906 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue @@ -1,12 +1,8 @@ - diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardColumns.tsx b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardColumns.tsx index 79816b50..18e76f53 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardColumns.tsx +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardColumns.tsx @@ -209,26 +209,7 @@ export const columns: BasicColumn[] = [ }, ] -export const searchFormSchema: FormSchema[] = [ - { - field: 'toName', - label: 'TO', - component: 'Input', - colProps: { span: 4 }, - }, - { - field: 'toAttn', - label: 'ATTN', - component: 'Input', - colProps: { span: 4 }, - }, - { - field: 'fromName', - label: 'FROM', - component: 'Input', - colProps: { span: 4 }, - }, -] + export const formSchema: FormSchema[] = [ { label: '主键Id', diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardDetails.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardDetails.vue index a1e49e19..1bdc3cae 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardDetails.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardDetails.vue @@ -2,46 +2,39 @@ - - - - - - + + + + + + + + + + + @@ -49,9 +42,9 @@ diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue index 851c3c4e..612044f2 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue @@ -1,58 +1,41 @@