diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index b1175d42..203ed1ad 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -16,7 +16,7 @@ import { Persistent } from '/@/utils/cache/persistent' import { darkMode } from '/@/settings/designSetting' import { resetRouter } from '/@/router' import { deepMerge } from '/@/utils' - +import { useRouter } from 'vue-router' interface AppState { darkMode?: ThemeEnum // Page loading status diff --git a/src/views/operation/seaexport/api/BookingLedger.js b/src/views/operation/seaexport/api/BookingLedger.js index bfceda0a..76b29f8a 100644 --- a/src/views/operation/seaexport/api/BookingLedger.js +++ b/src/views/operation/seaexport/api/BookingLedger.js @@ -27,9 +27,9 @@ export function BookingOrderGet(parameter) { // 业务单据批量删除 (Auth) export function SeaExportBatchDel(parameter) { return request({ - url: `/opApi/SeaExport/SeaExportBatchDel${parameter}`, - method: 'get', - // params: parameter, + url: `/opApi/SeaExport/SeaExportBatchDel`, + method: 'post', + data: parameter, }) } // 批量编辑 (Auth) @@ -572,7 +572,6 @@ export function GetFile(parameter) { */ export function AddFile(params) { - console.log(params) return request({ url: '/BookingOrder/addFile', method: 'post', diff --git a/src/views/operation/seaexport/asd.json b/src/views/operation/seaexport/asd.json index ae4c0308..73e78ec0 100644 --- a/src/views/operation/seaexport/asd.json +++ b/src/views/operation/seaexport/asd.json @@ -1,20 +1,50 @@ - -The Level field is required -The TaxNo field is required -The CtnType field is required -The RMBBank field is required -The StlDate field is required -The StlName field is required -The USDBank field is required -The AuditNote field is required -The RMBAccount field is required -The USDAccount field is required -The CarrierList field is required -The InvoiceBank field is required -The RMBOnlineNO field is required -The USDOnlineNO field is required -The StlMiddleDate field is required -The InvoiceStlDate field is required -The StlFirstHalfDate field is required -The CustomAttributes1 field is required -The CustomAttributes2 field is required. \ No newline at end of file +{ + "YardTel": "", + "YardATTN": "", + "InnerVoyno": "", + "AgentContent": "", + "TemperatureSet": "", + "yard": "1788484097849561088", + "carrier": "", + "forwarder": "", + "forwarderId": "", + "Lane": "", + "laneId": "", + "hblno": "", + "saleId": "", + "customser": "", + "trucker": "", + "loadPortId": "", + "dischargePortId": "", + "vessel": "", + "voyno": "", + "etd": "", + "agentId": "", + "blType": "", + "doc": "", + "closingDate": "", + "contractNo": "", + "serviceContractNo": "", + "customerService": "", + "closeDocDate": "", + "sourceId": "", + "shipAgencyId": "", + "operatorId": "", + "destination": "", + "destinationId": "", + "atd": "", + "hsCode": "", + "deliveryPlace": "", + "orderNo": "", + "issuePlace": "", + "issueDate": "", + "saleDeptId": "", + "customername": "", + "accountDate": "", + "Sale": "", + "saleOrgId": "", + "cargoId": "", + "agent": "", + "Remark": "", + "ids": ["1780891904372772864", "1783794830388891648"] +} diff --git a/src/views/operation/seaexport/columns.tsx b/src/views/operation/seaexport/columns.tsx index 151d6968..c331694d 100644 --- a/src/views/operation/seaexport/columns.tsx +++ b/src/views/operation/seaexport/columns.tsx @@ -56,8 +56,6 @@ const Fncustomername: any = await GetControllerClientList() if (Fncustomername.succeeded) { ListData.customername = [] Fncustomername.data.forEach((e) => { - console.log(e) - ListData.customername.push({ label: `${e.codeName}/${e.shortName}`, value: e.id, ...e }) }) } @@ -121,8 +119,6 @@ const FnsaleId: any = await GetSaleUserList() if (FnsaleId.succeeded) { ListData.saleId = [] FnsaleId.data.forEach((e) => { - console.log(e, 111) - ListData.saleId.push({ ...e, label: `${e.userName}/${e.userCode}`, value: e.id }) }) } @@ -207,14 +203,14 @@ const FnprepareAt: any = await GetClientPortSelectList() if (FnprepareAt.succeeded) { ListData.prepareAt = [] FnprepareAt.data.forEach((e) => { - ListData.prepareAt.push({ label: e.cnName, value: e.id }) + ListData.prepareAt.push({ ...e, label: `${e.portName}/${e.ediCode}`, value: e.id }) }) } const FnpayableAt: any = await GetClientPortSelectList() if (FnpayableAt.succeeded) { ListData.payableAt = [] FnpayableAt.data.forEach((e) => { - ListData.payableAt.push({ label: e.cnName, value: e.id }) + ListData.payableAt.push({ ...e, label: `${e.portName}/${e.ediCode}`, value: e.id }) }) } const Fnservice: any = await GetServiceSelectList() @@ -1872,8 +1868,6 @@ export const mailingInfoFormSchemaL: FormSchema[] = [ return { label: '发货人', onChange: (e) => { - console.log(e) - formModel[`shipper${e.type}`] = e.res }, } @@ -3641,77 +3635,116 @@ export const BatchModificationFormSchema: FormSchema[] = [ label: '场站联系方式', field: 'YardTel', component: 'Input', - defaultValue: '', + show: false, }, { label: '场站联系人', field: 'YardATTN', component: 'Input', - defaultValue: '', + show: false, }, { label: '', field: 'InnerVoyno', component: 'Input', - defaultValue: '', + show: false, }, { label: '', field: 'AgentContent', component: 'Input', - defaultValue: '', + show: false, }, { label: '', field: 'TemperatureSet', component: 'Input', - defaultValue: '', + show: false, }, - { + label: '', field: 'yard', + component: 'Input', + + show: false, + }, + { + field: 'yardId', label: '场站', component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, - componentProps: { - options: ListData.yard, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + componentProps: ({ schema, tableAction, formActionType, formModel }) => { + return { + options: ListData.yard, + allowClear: true, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e) => { + if (e) { + ListData.yard.forEach((item) => { + if (item.value == e) { + formModel.yard = item.label + } + }) + } else { + formModel.yard = '' + } + }, + } }, }, { - label: '船公司', + label: '', field: 'carrier', + component: 'Input', + + show: false, + }, + { + label: '船公司', + field: 'carrierId', component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, - componentProps: { - allowClear: true, - options: ListData.carrier, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + componentProps: ({ schema, tableAction, formActionType, formModel }) => { + return { + options: ListData.carrier, + allowClear: true, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e) => { + if (e) { + ListData.carrier.forEach((item) => { + if (item.value == e) { + formModel.carrier = item.label + } + }) + } else { + formModel.carrier = '' + } + }, + } }, }, { label: '订舱代理', field: 'forwarder', component: 'Input', - defaultValue: '', + show: false, }, { @@ -3720,7 +3753,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -3748,7 +3781,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ label: '船司航线', field: 'Lane', component: 'Input', - defaultValue: '', + show: false, }, { @@ -3757,7 +3790,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -3787,7 +3820,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, }, { @@ -3796,7 +3829,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -3832,7 +3865,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { options: ListData.customser, @@ -3849,7 +3882,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { options: ListData.trucker, @@ -3866,7 +3899,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -3903,7 +3936,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -3940,7 +3973,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -3957,7 +3990,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -3974,7 +4007,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'DatePicker', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { showTime: true, @@ -3987,7 +4020,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { options: ListData.agentId, @@ -4004,7 +4037,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { options: ListData.blType, @@ -4021,7 +4054,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -4044,7 +4077,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'DatePicker', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { showTime: true, @@ -4057,7 +4090,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, }, { @@ -4066,7 +4099,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, }, { @@ -4075,7 +4108,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -4098,7 +4131,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'DatePicker', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { showTime: true, @@ -4111,7 +4144,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -4163,7 +4196,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -4187,7 +4220,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -4210,7 +4243,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -4238,7 +4271,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ label: '目的地代码', field: 'destinationId', component: 'Input', - defaultValue: '', + required: false, colProps: { span: 4 }, }, @@ -4248,7 +4281,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'DatePicker', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { showTime: true, @@ -4260,7 +4293,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ field: 'hsCode', component: 'Input', required: false, - defaultValue: '', + colProps: { span: 3 }, }, { @@ -4269,7 +4302,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -4316,14 +4349,14 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Input', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, }, { label: '签单地点', field: 'issuePlace', component: 'Input', - defaultValue: '', + required: false, colProps: { span: 4 }, }, @@ -4333,7 +4366,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'DatePicker', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { showTime: true, @@ -4346,7 +4379,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -4363,7 +4396,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { allowClear: true, @@ -4390,7 +4423,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'MonthPicker', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { valueFormat: 'YYYY-MM', @@ -4400,7 +4433,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ label: '船司航线', field: 'Sale', component: 'Input', - defaultValue: '', + show: false, }, { @@ -4409,7 +4442,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: ({ schema, tableAction, formActionType, formModel }) => { return { @@ -4439,7 +4472,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'Select', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 4 }, componentProps: { options: ListData.cargoId, @@ -4456,7 +4489,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'InputTextArea', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 12 }, componentProps: { rows: 3, @@ -4468,7 +4501,7 @@ export const BatchModificationFormSchema: FormSchema[] = [ component: 'InputTextArea', required: false, dynamicDisabled: false, - defaultValue: '', + colProps: { span: 12 }, componentProps: { rows: 3, diff --git a/src/views/operation/seaexport/detail/modules/goodsTable.vue b/src/views/operation/seaexport/detail/modules/goodsTable.vue index 4f77550a..d0babeee 100644 --- a/src/views/operation/seaexport/detail/modules/goodsTable.vue +++ b/src/views/operation/seaexport/detail/modules/goodsTable.vue @@ -75,7 +75,7 @@
- +
暂无数据
加载中 ...
@@ -90,14 +90,6 @@ @cancel="handleModelCancel" >
- -
新增 @@ -109,11 +101,9 @@ - -
@@ -267,11 +257,6 @@ className: 'htCenter', readOnly: false, }, - // { - // title: '箱型代码', - // width: 120, - // data: 'ctnCode', - // }, { title: '箱型', width: 120, @@ -788,140 +773,7 @@ data: 'actualArrivalPortTime', }, ] - // 表格配置项 - const settings = { - height: '400', - width: '100%', - autoWrapRow: true, - autoWrapCol: true, - // 每行的高度 - rowHeights: 32, - // 需要隐藏的列 - // hiddenColumns: { - // columns: [1], - // indicators: true, - // }, - // 如果通过复制或者填写校验出现错误,清空输入框 - afterValidate: function (isValid, value, row, prop, source) { - if (!isValid) { - hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') - } - }, - columns: columns, - // 此行直接复制,必须(非商用) - licenseKey: 'non-commercial-and-evaluation', - // 定义所有单元格发生变化的回调处理 - afterChange(changes, source) { - // 这里定义了编辑,自动填充和拷贝数据的处理逻辑 - if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { - let dict = {} - changes.forEach((res) => { - // 修改费用名称 - if (res[1] === 'feeName') { - // 获取当前选中的字典对象数据 - const item = feeDict.value.filter((item) => { - return item.name === changes[0][3] - }) - if (item) dict = item[0] - list.value[res[0]]['feeEnName'] = dict['enName'] - list.value[res[0]]['feeCode'] = dict['code'] - } - }) - // 修改费用英文名称 - if (changes[0][1] === 'feeEnName') { - } - // 修改客户类别 - if (changes[0][1] === 'customerTypeName') { - getDictOption('djy_cust_prop').then((res) => { - const item = res.filter((item) => { - return item.name === changes[0][3] - }) - if (item) dict = item[0] - list.value[changes[0][0]]['customerType'] = dict?.value - }) - } - // 修改单位 - if (changes[0][1] === 'unitName') { - const item = unitDict.value.filter((item) => { - return item.name === changes[0][3] - }) - if (item) dict = item[0] - list.value[changes[0][0]]['unit'] = dict?.value - } - // 修改币别 - if (changes[0][1] === 'currencyName') { - const item = currencyDict.value.filter((item) => { - return item.name === changes[0][3] - }) - if (item) dict = item[0] - list.value[changes[0][0]]['currency'] = dict?.codeName - } - // 当前操作的行 - const index = changes[0][0] - // 修改不含税单价计算 - if (changes[0][1] === 'noTaxPrice') { - // 单价 - list.value[index].unitPrice = - (changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1) - // 金额 - list.value[index].amount = - (list.value[index].unitPrice || 0) * (list.value[index].quantity || 0) - // 不含税金额 - list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].quantity || 0) - } - // 修改单价计算 - if (changes[0][1] === 'unitPrice') { - // 不含税单价 - list.value[index].noTaxPrice = - (changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1) - // 金额 - list.value[index].amount = (changes[0][3] || 0) * (list.value[index].quantity || 0) - // 不含税金额 - list.value[index].noTaxAmount = - (list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0) - } - // 修改数量 - if (changes[0][1] === 'quantity') { - // 金额 - list.value[index].amount = (changes[0][3] || 0) * (list.value[index].unitPrice || 0) - // 不含税金额 - list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].noTaxPrice || 0) - } - // 修改税率 - if (changes[0][1] === 'taxRate') { - // 不含税单价 - list.value[index].noTaxPrice = - (list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1) - // 不含税金额 - list.value[index].noTaxAmount = - (list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0) - } - } - }, - } - // 多品名表格 - const moreSettings = { - height: '200', - width: '100%', - autoWrapRow: true, - autoWrapCol: true, - // 每行的高度 - rowHeights: 32, - // 如果通过复制或者填写校验出现错误,清空输入框 - afterValidate: function (isValid, value, row, prop, source) { - if (!isValid) { - hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') - } - }, - columns: moreColumns, - // 此行直接复制,必须(非商用) - licenseKey: 'non-commercial-and-evaluation', - // 定义所有单元格发生变化的回调处理 - afterChange(changes, source) { - console.log(changes, source) - }, - } const moreSelectLoad = ref(true) // 选中数据 const moreSelectNum = ref() @@ -953,40 +805,7 @@ }) } }) - const moreTSettings = { - height: '200', - width: '100%', - autoWrapRow: true, - autoWrapCol: true, - // 每行的高度 - rowHeights: 32, - columns: moreTColumns, - // 此行直接复制,必须(非商用) - licenseKey: 'non-commercial-and-evaluation', - // 定义所有单元格发生变化的回调处理 - afterChange(changes, source) { - if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { - // 控制表格单选 - if (changes[0][1] == 'selected' && changes[0][3]) { - let Arr: any = [] - moreTList.value.forEach((e, i) => { - if (i !== changes[0][0]) { - Arr.push({ ...e, selected: false }) - } else { - moreSelectNum.value = i - Arr.push({ ...e, selected: true }) - } - }) - moreTList.value.splice(0) - Arr.forEach((e) => { - moreTList.value.push(e) - }) - } - console.log(moreTList.value) - console.log(changes, source) - } - }, - } + // 添加行 function addboxLine() { list.value.push({}) @@ -2324,7 +2143,92 @@ }) return str } - + // 表格配置项 + const settings = { + height: '400', + width: '100%', + autoWrapRow: true, + autoWrapCol: true, + // 每行的高度 + rowHeights: 32, + // 需要隐藏的列 + // hiddenColumns: { + // columns: [1], + // indicators: true, + // }, + // 如果通过复制或者填写校验出现错误,清空输入框 + afterValidate: function (isValid, value, row, prop, source) { + if (!isValid) { + hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') + } + }, + columns: columns, + // 此行直接复制,必须(非商用) + licenseKey: 'non-commercial-and-evaluation', + // 定义所有单元格发生变化的回调处理 + afterChange(changes, source) { + // 这里定义了编辑,自动填充和拷贝数据的处理逻辑 + if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { + console.log(changes, source) + } + }, + } + const moreTSettings = { + height: '200', + width: '100%', + autoWrapRow: true, + autoWrapCol: true, + // 每行的高度 + rowHeights: 32, + columns: moreTColumns, + // 此行直接复制,必须(非商用) + licenseKey: 'non-commercial-and-evaluation', + // 定义所有单元格发生变化的回调处理 + afterChange(changes, source) { + if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { + // 控制表格单选 + if (changes[0][1] == 'selected' && changes[0][3]) { + let Arr: any = [] + moreTList.value.forEach((e, i) => { + if (i !== changes[0][0]) { + Arr.push({ ...e, selected: false }) + } else { + moreSelectNum.value = i + Arr.push({ ...e, selected: true }) + } + }) + moreTList.value.splice(0) + Arr.forEach((e) => { + moreTList.value.push(e) + }) + } + console.log(moreTList.value) + console.log(changes, source) + } + }, + } + // 多品名表格 + const moreSettings = { + height: '200', + width: '100%', + autoWrapRow: true, + autoWrapCol: true, + // 每行的高度 + rowHeights: 32, + // 如果通过复制或者填写校验出现错误,清空输入框 + afterValidate: function (isValid, value, row, prop, source) { + if (!isValid) { + hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') + } + }, + columns: moreColumns, + // 此行直接复制,必须(非商用) + licenseKey: 'non-commercial-and-evaluation', + // 定义所有单元格发生变化的回调处理 + afterChange(changes, source) { + console.log(changes, source) + }, + } defineExpose({ list, }) diff --git a/src/views/operation/seaexport/detail/modules/operationArea.vue b/src/views/operation/seaexport/detail/modules/operationArea.vue index e55dfa8c..b75f4542 100644 --- a/src/views/operation/seaexport/detail/modules/operationArea.vue +++ b/src/views/operation/seaexport/detail/modules/operationArea.vue @@ -889,7 +889,7 @@ function copyBooking() { emit('copy') } - + // 打印 function FSnhowPrintModal() { cateCode.value = 'zhudan_print' let DprintType = '' diff --git a/src/views/operation/seaexport/detail/modules/rightContent.vue b/src/views/operation/seaexport/detail/modules/rightContent.vue index eab37da3..5fed7d19 100644 --- a/src/views/operation/seaexport/detail/modules/rightContent.vue +++ b/src/views/operation/seaexport/detail/modules/rightContent.vue @@ -674,7 +674,21 @@ const attachName = ref('') const bookingAttachType: Ref> = ref([]) const atdLoading = ref(false) - init() + watch( + () => props.id, + (nval, oval) => { + console.log(nval, oval, 11111111111111111111111111111111) + if (nval) { + init() + } else { + RemarkList.value = [] + } + }, + { + immediate: true, + }, + ) + function init() { Getremark() } diff --git a/src/views/operation/seaexport/index.vue b/src/views/operation/seaexport/index.vue index c52d3899..e375c23a 100644 --- a/src/views/operation/seaexport/index.vue +++ b/src/views/operation/seaexport/index.vue @@ -1348,6 +1348,7 @@ :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }" @submit="handleSubmitCopyMore" + :style="{ padding: '10px' }" > { + // if (i == 0) { + // api = `?Ids=${e}` + // } else { + // api = `${api}&Ids=${e}` + // } + // }) + // console.log(api); + let api = [] arr.forEach((e, i) => { - if (i == 0) { - api = `?Ids=${e}` - } else { - api = `${api}&Ids=${e}` - } + api.push(e) }) - SeaExportBatchDel(api) + SeaExportBatchDel({ ids: api }) .then((res) => { if (res.succeeded) { notification.success({ message: '删除成功', duration: 3 }) @@ -1975,11 +1981,11 @@ height: '50px', lineHeight: '50px', }) - const copyMoreFlag = ref(false) + const copyMoreForm = reactive({ - number: '', + number: 1, }) - const RefcopyMoreForm = ref() + const RefeditingForm = ref() const editingForm = reactive({ vessel: '', @@ -2119,11 +2125,60 @@ onresize() }) // ==================================================== - + // 新建 function addBooking() { addNum.value = Math.round(Math.random() * 1000) go(`/BookingDetail?addNum=${addNum.value}`) } + // 复制 + function copyBooking() { + const select = getSelectRows() + const pkIdArr = select.map((item, index) => { + return item.id + }) + if (pkIdArr.length > 1) { + notification.error({ message: '请选择一条数据', duration: 3 }) + return false + } else if (pkIdArr.length === 0) { + notification.error({ message: '请至少选择一条数据', duration: 3 }) + return false + } + go(`/BookingDetail?id=${pkIdArr[0]}&isCopy=${true}`) + } + + // 复制多票 + const copyMoreFlag = ref(false) + function copyBookingMore() { + const select = getSelectRows() + const pkIdArr = select.map((item, index) => { + return item.id + }) + if (pkIdArr.length > 1) { + notification.error({ message: '请选择一条数据', duration: 3 }) + return false + } else if (pkIdArr.length === 0) { + notification.error({ message: '请至少选择一条数据', duration: 3 }) + return false + } + copyMoreFlag.value = true + } + const RefcopyMoreForm = ref() + function handleSubmitCopyMore(e) { + const select = getSelectRows() + const pkIdArr = select.map((item) => { + return item.id + }) + for (let index = 0; index < copyMoreForm.number; index++) { + setTimeout(() => { + console.log(`/?id=${pkIdArr[0]}&isCopy=${true}©Id=${index}`) + router.push({ + path: '/BookingDetail', + query: { id: pkIdArr[0], isCopy: true, copyId: index }, + }) + }, 100) + } + copyMoreFlag.value = false + } // ==================================================== function getListByone(listId, listIndex) { PageDataByBooking({ id: listId }).then((res) => { @@ -2664,47 +2719,6 @@ return GetTenantLineList } } - function copyBooking() { - const select = xGrid.value.getCheckboxRecords() - const pkIdArr = select.map((item, index) => { - return item.id - }) - if (pkIdArr.length > 1) { - notification.error({ message: '请选择一条数据', duration: 3 }) - return false - } else if (pkIdArr.length === 0) { - notification.error({ message: '请至少选择一条数据', duration: 3 }) - return false - } - go(`/BookingDetail?id=${pkIdArr[0]}&isCopy=${true}`) - } - function copyBookingMore() { - const select = xGrid.value.getCheckboxRecords() - const pkIdArr = select.map((item, index) => { - return item.id - }) - if (pkIdArr.length > 1) { - notification.error({ message: '请选择一条数据', duration: 3 }) - return false - } else if (pkIdArr.length === 0) { - notification.error({ message: '请至少选择一条数据', duration: 3 }) - return false - } - copyMoreFlag.value = true - } - function handleSubmitCopyMore(e) { - e.preventDefault() - RefcopyMoreForm.value.validateFields((err, values) => { - if (!err) { - const select = xGrid.value.getCheckboxRecords() - const pkIdArr = select.map((item, index) => { - return item.id - }) - appStore.setcopyPages({ number: values.number, path: pkIdArr[0] }) - copyMoreFlag.value = false - } - }) - } function editingHandleOk() { RefeditingForm.value.validateFields((errors, values) => {