diff --git a/src/store/modules/configOptions.ts b/src/store/modules/configOptions.ts index 490b4509..8ba67364 100644 --- a/src/store/modules/configOptions.ts +++ b/src/store/modules/configOptions.ts @@ -20,6 +20,7 @@ import { GetPackageSelectList, GetTruckClientList, GetDispatcherList, + GetFactorySelectList, } from '/@/views/operation/seaexport/api/BookingLedger' import { getList } from '/@/views/flowcenter/flowInstances/api' import { GetFeeCurrencySelectList } from '/@/api/common/index' @@ -132,4 +133,10 @@ export default { return res.data }) }, + //工厂信息 + GetFactorySelectList: () => { + return GetFactorySelectList().then((res) => { + return res.data + }) + }, } diff --git a/src/store/modules/options.ts b/src/store/modules/options.ts index a9575b14..88bd34d9 100644 --- a/src/store/modules/options.ts +++ b/src/store/modules/options.ts @@ -45,7 +45,9 @@ export const useOptionsStore = defineStore({ // 币别 GetTruckClientList: null, // 派车调度人员 - GetDispatcherList:null + GetDispatcherList:null, + // 工厂 + GetFactorySelectList:null }), getters: { // 通过code获取下拉字典(code)就是接口尾部单词 diff --git a/src/views/baseinfo/factory/TenantAuditStepModal.vue b/src/views/baseinfo/factory/TenantAuditStepModal.vue new file mode 100644 index 00000000..989522e7 --- /dev/null +++ b/src/views/baseinfo/factory/TenantAuditStepModal.vue @@ -0,0 +1,126 @@ + + diff --git a/src/views/baseinfo/factory/api.ts b/src/views/baseinfo/factory/api.ts new file mode 100644 index 00000000..0159ee45 --- /dev/null +++ b/src/views/baseinfo/factory/api.ts @@ -0,0 +1,42 @@ +// @ts-ignore +import { request } from '/@/utils/request' +import { DataResult, PageRequest } from '/@/api/model/baseModel' +enum Api { + list = '/mainApi/CodeFactory/GetFactoryList', + edit = '/mainApi/CodeFactory/EditCodeFactory', + info = '/mainApi/CodeFactory/GetCodeFactoryInfo', + del = '/mainApi/CodeFactory/BatchDelCodeFactory', + +} +// 列表 (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/factory/columns.tsx b/src/views/baseinfo/factory/columns.tsx new file mode 100644 index 00000000..3fe71ad1 --- /dev/null +++ b/src/views/baseinfo/factory/columns.tsx @@ -0,0 +1,170 @@ +import { BasicColumn, FormSchema } from '/@/components/Table' +import { Tag } from 'ant-design-vue' +import { getOptions } from '/@/hooks/dict' +export const columns: BasicColumn[] = [ + { + title: '工厂中文名称', + dataIndex: 'factoryName', + width: 150, + }, + { + title: '工厂英文文名称', + dataIndex: 'enName', + width: 150, + }, + { + title: '工厂地址', + dataIndex: 'factoryAddress', + width: 150, + }, + { + title: '工厂联系人', + dataIndex: 'factoryAttn', + width: 150, + }, + { + title: '工厂联系电话', + dataIndex: 'factoryTel', + width: 150, + }, + { + title: '委托单位', + dataIndex: 'customerName', + width: 150, + }, + { + title: '是否启用', + dataIndex: 'status', + width: 80, + customRender: ({ text }) => { + if (text === 0) { + return 启用 + } else if (text === 1) { + return 禁用 + } + return text + }, + }, + { + title: '备注', + dataIndex: 'note', + width: 150, + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + field: 'factoryName', + label: '工厂中文名称', + component: 'Input', + colProps: { span: 6 }, + }, +] +export const formSchema: FormSchema[] = [ + { + label: '', + field: 'id', + component: 'Input', + defaultValue: '', + show: false, + }, + { + field: 'factoryName', + label: '工厂中文名称', + component: 'Input', + colProps: { span: 12 }, + }, + + { + field: 'enName', + label: '工厂英文文名称', + component: 'Input', + colProps: { span: 12 }, + defaultValue: '', + }, + { + field: 'factoryAddress', + label: '工厂地址', + component: 'Input', + colProps: { span: 12 }, + defaultValue: '', + }, + + { + field: 'factoryAttn', + label: '工厂联系人', + component: 'Input', + colProps: { span: 12 }, + defaultValue: 0, + }, + { + field: 'factoryTel', + label: '工厂联系电话', + component: 'Input', + colProps: { span: 12 }, + defaultValue: 0, + }, + { + label: '委托单位Nmae', + field: 'customerName', + component: 'Input', + // defaultValue: '', + show: false, + }, + { + label: '委托单位', + field: 'customerId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + // defaultValue: '', + colProps: { span: 12 }, + componentProps: ({ formModel }) => { + return { + allowClear: true, + showSearch: true, + api: () => { + return new Promise((resolve) => { + const arr = getOptions('controller') + resolve(arr) + }) + }, + labelField: 'name', + valueField: 'id', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + if (obj) { + formModel.customerName = obj.label + } else { + formModel.customerName = '' + } + }, + } + }, + }, + { + field: 'note', + label: '备注', + component: 'InputTextArea', + colProps: { span: 12 }, + componentProps: { + rows: 2, + }, + }, + { + field: 'status', + label: '是否可用', + component: 'RadioButtonGroup', + defaultValue: 0, + colProps: { span: 12 }, + componentProps: { + options: [ + { label: '禁用', value: 1 }, + { label: '启用', value: 0 }, + ], + }, + }, +] diff --git a/src/views/baseinfo/factory/index.vue b/src/views/baseinfo/factory/index.vue new file mode 100644 index 00000000..e5f16871 --- /dev/null +++ b/src/views/baseinfo/factory/index.vue @@ -0,0 +1,133 @@ + + diff --git a/src/views/dashboard/analysis2/index2.vue b/src/views/dashboard/analysis2/index2.vue index 81eab3c2..d8f38fa1 100644 --- a/src/views/dashboard/analysis2/index2.vue +++ b/src/views/dashboard/analysis2/index2.vue @@ -125,7 +125,7 @@ if (!id) { id = 0 } - BookingOrderOcrUpFile({ data: formData, parameter: { bookingId: id } }).then((res) => { + UploadOcrFile({ data: formData, parameter: { bookingId: id } }).then((res) => { if (res.success) { fileName.value = res.data.ocrFileName if (id == 0) { diff --git a/src/views/operation/seaexport/api/BookingLedger.js b/src/views/operation/seaexport/api/BookingLedger.js index 3e73c89a..c35149d8 100644 --- a/src/views/operation/seaexport/api/BookingLedger.js +++ b/src/views/operation/seaexport/api/BookingLedger.js @@ -625,6 +625,14 @@ export function SubmitTelex(parameter) { data: parameter, }) } +// 获取工厂信息下拉列表-客户端 (Auth) +export function GetFactorySelectList(parameter) { + return request({ + url: '/mainApi/ClientCommon/GetFactorySelectList', + method: 'get', + params: parameter, + }) +} /** * 获取分页查询客户 * @params ShortName @@ -1104,43 +1112,41 @@ export function BookingOrderDownload(parameter) { } // 上传ocr文件 -export function BookingOrderOcrUpFile(data) { +export function UploadOcrFile(data) { return request({ - url: '/BookingOrder/OcrUpFile', + url: '/opApi/SeaExport/UploadOcrFile', method: 'post', data: data.data, params: data.parameter, }) } - -/** - * 更新订舱 - */ -export function BookingOrderUpdate(parameter) { - return request({ - url: '/BookingOrder/Update', - method: 'post', - data: parameter, - }) -} - // 获取图片 -export function BookingOrderOcrGetImg(parameter) { +export function GetOcrImg(parameter) { return request({ - url: '/BookingOrder/OcrGetImg', + url: '/opApi/SeaExport/GetOcrImg', method: 'post', params: parameter, responseType: 'arraybuffer', }) } // 获取文字 -export function BookingOrderOcrGetText(parameter) { +export function GetOcrText(parameter) { return request({ - url: '/BookingOrder/OcrGetText', + url: '/opApi/SeaExport/GetOcrText', method: 'post', params: parameter, }) } +/** + * 更新订舱 + */ +export function BookingOrderUpdate(parameter) { + return request({ + url: '/BookingOrder/Update', + method: 'post', + data: parameter, + }) +} /** * 新增订舱 diff --git a/src/views/operation/seaexport/components/SelectTextArea.vue b/src/views/operation/seaexport/components/SelectTextArea.vue index 51ceb33a..bc3588a2 100644 --- a/src/views/operation/seaexport/components/SelectTextArea.vue +++ b/src/views/operation/seaexport/components/SelectTextArea.vue @@ -2,20 +2,99 @@
- + {{ props.label }}
+
第二
+ +
+ + + +
+
+
第二通知人
+ + + {{ item.shortName }} ({{ item.codeName }}) + + +
+ 30 + 35 + 40 +
+
+
+ + + +
+
+
+
+
+
+
+ diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx index 8930adfa..90270520 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckColumns.tsx @@ -540,13 +540,45 @@ export const formSchema: FormSchema[] = [ defaultValue: '', show: false, }, + // { + // label: '工厂', + // field: 'factoryId', + // component: 'ApiSelect', + // defaultValue: '', + // colProps: { + // span: 24, + // }, + // }, { label: '工厂', field: 'factoryId', component: 'ApiSelect', - defaultValue: '', - colProps: { - span: 24, + required: false, + dynamicDisabled: false, + colProps: { span: 24 }, + componentProps: ({ formModel }) => { + return { + immediate: false, + option: optionsStore.getOptionsByCode('GetFactorySelectList'), + labelField: 'factoryName', + valueField: 'id', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + if (obj) { + formModel.factoryName = obj.factoryName + formModel.factoryAddress = obj.factoryAddress + formModel.factoryAttn = obj.factoryAttn + formModel.factoryTel = obj.factoryTel + } else { + formModel.factoryName = '' + formModel.factoryAddress = '' + formModel.factoryAttn = '' + formModel.factoryTel = '' + } + }, + } }, }, { diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue index 06b82906..44cbf7c3 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessTruckEdit.vue @@ -1,23 +1,29 @@ + diff --git a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue index 612044f2..cf1cfd4d 100644 --- a/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue +++ b/src/views/operation/seaexport/detail/modules/Letter/OpBusinessYardEdit.vue @@ -1,9 +1,9 @@ + diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 06fb5365..7e2b33c1 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -479,9 +479,9 @@ export const basicInfoFormSchema: FormSchema[] = [ valueField: 'voyNo', filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - } + }, } - } + }, }, { label: '船司航线', @@ -697,9 +697,9 @@ export const basicInfoFormSchema: FormSchema[] = [ valueField: 'id', filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - } + }, } - } + }, }, { label: '客服员', @@ -713,7 +713,9 @@ export const basicInfoFormSchema: FormSchema[] = [ return { api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetCustomerServiceList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetCustomerServiceList')), + ) data.forEach((e) => { e.userName = `${e.userCode}/${e.userName}` }) @@ -741,7 +743,9 @@ export const basicInfoFormSchema: FormSchema[] = [ return { api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetCustomerServiceList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetCustomerServiceList')), + ) data.forEach((e) => { e.userName = `${e.userCode}/${e.userName}` }) @@ -862,8 +866,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ onChange: (e) => { if (e) { if (e.type == 'Id') { - formModel.shipper = e.res.shortName - formModel.shipperId = e.res.id + formModel.shipper = e.label + formModel.shipperId = e.value } else { formModel[`shipper${e.type}`] = e.res } @@ -905,8 +909,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ onChange: (e) => { if (e) { if (e.type == 'Id') { - formModel.consignee = e.res.shortName - formModel.consigneeId = e.res.id + formModel.consignee = e.label + formModel.consigneeId = e.value } else { formModel[`consignee${e.type}`] = e.res } @@ -936,6 +940,27 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ // defaultValue: '', show: false, }, + { + label: '', + field: 'secondNotifyPartyContent', + component: 'Input', + // defaultValue: '', + show: false, + }, + { + label: '', + field: 'secondNotifyParty', + component: 'Input', + // defaultValue: '', + show: false, + }, + { + label: '', + field: 'secondNotifyPartyId', + component: 'Input', + // defaultValue: '', + show: false, + }, { field: 'tzr', component: 'SelectTextArea', @@ -947,11 +972,25 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ field: 'notifyParty', onChange: (e) => { if (e) { - if (e.type == 'Id') { - formModel.notifyParty = e.res.shortName - formModel.notifyPartyId = e.res.id - } else { - formModel[`notifyParty${e.type}`] = e.res + console.log(e, 123) + + switch (e.type) { + case 'Content': + formModel[`notifyParty${e.type}`] = e.res + break + case 'Id': + formModel.notifyParty = e.res.label + formModel.notifyPartyId = e.res.value + break + case 'Content2': + formModel.secondNotifyPartyContent = e.res + break + case 'Id2': + formModel.secondNotifyParty = e.res.label + formModel.secondNotifyPartyId = e.res.value + break + default: + break } } }, @@ -987,7 +1026,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((item) => { item.portName = `${item.portName}(${item.ediCode})` }) @@ -1124,7 +1165,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { e.ediCode = `${e.portName}/${e.ediCode}` }) @@ -1231,7 +1274,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { e.portName = `${e.portName}/${e.ediCode}` }) @@ -1328,9 +1373,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { - e.ediCode = `${e.portName}/${e.ediCode}` + e.ediCode = `${e.portName}/${e.ediCode}` }) resolve({ data }) }) @@ -1409,9 +1456,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { - e.ediCode = `${e.portName}/${e.ediCode}` + e.ediCode = `${e.portName}/${e.ediCode}` }) resolve({ data }) }) @@ -1498,9 +1547,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { - e.ediCode = `${e.portName}/${e.ediCode}` + e.ediCode = `${e.portName}/${e.ediCode}` }) resolve({ data }) }) @@ -1615,9 +1666,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { - e.ediCode = `${e.portName}/${e.ediCode}` + e.ediCode = `${e.portName}/${e.ediCode}` }) resolve({ data }) }) @@ -1687,7 +1740,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { e.portName = `${e.portName}/${e.ediCode}` }) @@ -1731,7 +1786,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ showSearch: true, api: () => { return new Promise((resolve) => { - const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList'))) + const data = JSON.parse( + JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), + ) data.forEach((e) => { e.portName = `${e.portName}/${e.ediCode}` }) diff --git a/src/views/operation/seaexport/detail/modules/operationArea.vue b/src/views/operation/seaexport/detail/modules/operationArea.vue index 4bf89187..81e6212e 100644 --- a/src/views/operation/seaexport/detail/modules/operationArea.vue +++ b/src/views/operation/seaexport/detail/modules/operationArea.vue @@ -71,14 +71,14 @@
- @@ -102,7 +102,7 @@ 提箱小票
- + --> +