diff --git a/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue index f9d6dbb8..c5e8e2a1 100644 --- a/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue @@ -50,6 +50,31 @@ +
+
+ + + 添加 + +
+
+ + + + +
+
@@ -101,9 +126,19 @@ pre-icon="ant-design:check-circle-outlined" type="primary" :loading="loading" + style="margin-right: 0.8rem" @click="handleSave(true)" >保存并关闭 + + 生成费用 + @@ -120,10 +155,20 @@ GetCtnSelectList, GetClientPortSelectList, } from '/@/views/operation/seaexport/api/BookingLedger' - import { ApiEdit, ApiInfo, ApiListDetail, ApiDelDetail } from './api' + import { + ApiEdit, + ApiInfo, + ApiListDetail, + ApiDelDetail, + ApiMakeFee, + ApiDetailView, + ApiAddCtn, + } from './api' import { GetClientListByCode } from '/@/api/common' import { useMessage } from '/@/hooks/web/useMessage' const { notification } = useMessage() + import { useOptionsStore } from '/@/store/modules/options' + const optionsStore = useOptionsStore() import DsFile from '/@/components/File/index.vue' // 应收表格组件 import FeeTable from '/@/components/CostEntry/feeTable.vue' @@ -137,13 +182,25 @@ labelWidth: 100, schemas: formSchema, showActionButtonGroup: false, + submitFunc: submit, }) - + const TotTableType = ref(false) + async function submit() { + const values = await validate() + if (values.rentDirectId == 1) { + TotTableType.value = true + } else { + TotTableType.value = false + } + } const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { resetFields() setModalProps({ confirmLoading: false, loading: true }) isUpdate.value = !!data?.isUpdate activeKey.value = '1' + TotTableType.value = false + Viewlist.value.splice(0) + list.value.splice(0) if (unref(isUpdate)) { // setModalProps({ confirmLoading: true }); rowId.value = data.record.id @@ -154,6 +211,9 @@ setFieldsValue({ ...res.data, }) + submit() + GetListDetail() + GetViewListDetail() } } else { rowId.value = '' @@ -161,16 +221,52 @@ setModalProps({ loading: false }) }) + function GetViewListDetail() { + ApiDetailView({ + queryCondition: '[]', + pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] }, + }).then((res) => { + Viewlist.value.splice(0) + res.data.forEach((item) => { + Viewlist.value.push(item) + }) + }) + } + function GetListDetail() { + ApiListDetail({ + queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`, + pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] }, + }).then((res) => { + list.value.splice(0) + res.data.forEach((item) => { + list.value.push(item) + }) + }) + } + function MakeFee() { + ApiMakeFee(rowId.value).then((res) => { + notification.success({ message: res.message, duration: 3 }) + }) + } async function handleSave(exit) { try { const values = await validate() setModalProps({ confirmLoading: true, loading: true }) // TODO custom api - console.log(values) + values.bodyList = list.value + + let Arr = ['pickupDate', 'dropoffDate', 'feeStartDate', 'bsdate'] + values.bodyList.forEach((item) => { + Arr.forEach((item2) => { + if (!item[item2]) { + item[item2] = null + } + }) + }) // loading.value = true; const res: API.DataResult = await ApiEdit(values) - console.log(res) + if (res.succeeded) { notification.success({ message: res.message, duration: 3 }) emit('success') @@ -216,6 +312,8 @@ const ContainerOwnerDict = ref([]) // 港口字段 const PortDict = ref([]) + // // 币别字段 + // const currencyDict = ref([]) watchEffect(() => { // 全选 if (allCheck.value) { @@ -310,12 +408,12 @@ data: 'dropoffPortCode', }, // ----------------- - { - title: '租箱业务号', - width: 200, - data: 'billno', - readOnly: true, - }, + // { + // title: '租箱业务号', + // width: 200, + // data: 'billno', + // readOnly: true, + // }, { title: '箱号', width: 120, @@ -354,21 +452,21 @@ // process(dict) // }, // }, - { - title: '租箱业务', - width: 120, - data: 'cmRentDirectEnum', - }, - { - title: '租箱类型', - width: 120, - data: 'rentType', - }, - { - title: '业务状态', - width: 120, - data: 'billState', - }, + // { + // title: '租箱业务', + // width: 120, + // data: 'cmRentDirectEnum', + // }, + // { + // title: '租箱类型', + // width: 120, + // data: 'rentType', + // }, + // { + // title: '业务状态', + // width: 120, + // data: 'billState', + // }, { title: '关联放箱单号', width: 120, @@ -391,7 +489,16 @@ { title: '币别', width: 120, - data: 'currenty', + data: 'currency', + type: 'dropdown', + // 下拉框数据,可以同步或者异步返回(异步需要process返回) + source: async (query, process) => { + const results = await optionsStore.getOptionsByCodeAsync('GetFeeCurrencySelectList') + const dict = results.map((item: any) => { + return item.description + }) + process(dict) + }, }, { title: '日租金', @@ -529,7 +636,6 @@ return item.portName === changes[0][3] }) if (item) dict = item[0] - console.log(dict) if (changes[0][1] === 'pickupPort') { list.value[changes[0][0]]['pickupPort'] = dict?.portName @@ -562,6 +668,109 @@ if (ApiData.ids.length) { ApiDelDetail(ApiData).then((res) => { if (res.succeeded) { + GetListDetail() + notification.success({ message: res.message, duration: 3 }) + } + }) + } + } + //--------------------------------------- tab1 View --------------------------------------- + const Viewlist = ref([]) + // 全部勾选 + const ViewlallCheck = ref(false) + // 部分勾选 + const ViewlsomeCheck = ref(false) + watchEffect(() => { + // 全选 + if (ViewlallCheck.value) { + Viewlist.value.forEach((item: any) => { + item.selected = true + }) + } else { + // 取消全选 + Viewlist.value.forEach((item: any) => { + item.selected = false + }) + } + }) + watch( + Viewlist.value, + (val) => { + let a = 0 + let b = 0 + val.forEach((item: any) => { + if (item.selected) { + a += 1 + } else { + b += 1 + } + }) + if (a == 0) { + ViewlallCheck.value = false + } + if (b == 0) { + ViewlallCheck.value = true + } + if (a != 0 && b != 0) { + ViewlsomeCheck.value = true + } else { + ViewlsomeCheck.value = false + } + }, + { + deep: true, + }, + ) + const Viewsettings = { + height: '163', + autoWrapRow: true, + autoWrapCol: true, + // 每行的高度 + rowHeights: 26, + fixedColumnsLeft: 1, + // 需要隐藏的列 + hiddenColumns: { + columns: [1, 2, 3, 4, 5, 6, 7, 8], + indicators: true, + }, + // 控制回车移动 + enterMoves: 'row', + columnSorting: false, + // 如果通过复制或者填写校验出现错误,清空输入框 + afterValidate: function (isValid, value, row, prop, source) { + if (!isValid) { + hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') + } + }, + columns: columns, + // 此行直接复制,必须(非商用) + licenseKey: 'non-commercial-and-evaluation', + // 定义所有单元格发生变化的回调处理 + async afterChange(changes, source) {}, + } + function ViewTableAdd() { + let ApiData: any = { ids: [] } + list.value.forEach((e: any, i) => { + if (e.selected) { + list.value.splice(i, 1) + } + }) + if (ApiData.ids.length) { + ApiAddCtn(ApiData).then(async (res) => { + if (res.succeeded) { + const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) + if (res.succeeded) { + allCheck.value = false + someCheck.value = false + setFieldsValue({ + ...res.data, + }) + ViewlallCheck.value = false + ViewlsomeCheck.value = false + submit() + GetListDetail() + GetViewListDetail() + } // getData(false) notification.success({ message: res.message, duration: 3 }) } diff --git a/src/views/ContainerManagement/RentIn/api.ts b/src/views/ContainerManagement/RentIn/api.ts index bf994980..961999cf 100644 --- a/src/views/ContainerManagement/RentIn/api.ts +++ b/src/views/ContainerManagement/RentIn/api.ts @@ -13,7 +13,38 @@ enum Api { Confirm = '/containerManagementApi/CM_RentIn/CM_RentIn_Confirm', Cancel = '/containerManagementApi/CM_RentIn/CM_RentIn_Cancel', + MakeFee = '/containerManagementApi/CM_RentIn/CM_RentIn_MakeFee', + DetailView = '/containerManagementApi/CM_RentIn/CM_RentIn_Detail_View', + AddCtn = '/containerManagementApi/CM_RentIn/CM_RentIn_AddCtn', + +} +// 租箱租入明细视图 (Auth) +export function ApiDetailView(data: PageRequest) { + return request({ + url: Api.DetailView, + method: 'post', + data, + }) +} +// 租箱租入退租_添加 (Auth) +export function ApiAddCtn(data: PageRequest) { + return request({ + url: Api.AddCtn, + method: 'post', + data, + }) +} +// 租箱租入_生成费用 (Auth) +export function ApiMakeFee(data: PageRequest) { + return request({ + url: Api.MakeFee, + method: 'post', + headers:{ + 'Content-Type':'application/json-patch+json' + }, + data, + }) } // 租箱租入_确认 (Auth) export function ApiConfirm(data: PageRequest) { diff --git a/src/views/ContainerManagement/RentIn/columns.tsx b/src/views/ContainerManagement/RentIn/columns.tsx index 56eaf7ea..0868725a 100644 --- a/src/views/ContainerManagement/RentIn/columns.tsx +++ b/src/views/ContainerManagement/RentIn/columns.tsx @@ -178,19 +178,40 @@ export const formSchema: FormSchema[] = [ show: false, }, { - field: 'rentDirect', - label: '租箱业务', - component: 'Input', + field: 'businessType', + label: '业务类型', + component: 'ApiSelect', colProps: { span: 6 }, - show: false, + defaultValue: '', + componentProps: ({}) => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('CM_BusinessType').then((res) => { + res.forEach((item) => { + item.value = parseInt(item.value) + }) + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, }, + { field: 'rentDirectId', label: '租箱业务', component: 'ApiSelect', colProps: { span: 6 }, defaultValue: '', - componentProps: ({ formModel }) => { + componentProps: ({ formModel, formActionType }) => { return { api: () => { return new Promise((resolve) => { @@ -209,6 +230,7 @@ export const formSchema: FormSchema[] = [ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, onChange: (e, obj) => { + formActionType ? formActionType.submit() : null if (e && obj) { formModel.rentDirect = obj.label } else { @@ -219,10 +241,31 @@ export const formSchema: FormSchema[] = [ }, }, { - field: 'rentType', + field: 'rentTypeId', label: '租箱类型', - component: 'Input', + component: 'ApiSelect', colProps: { span: 6 }, + defaultValue: '', + componentProps: ({}) => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('CM_RentType').then((res) => { + res.forEach((item) => { + item.value = parseInt(item.value) + }) + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, }, { field: 'billState', diff --git a/src/views/ContainerManagement/RentIn/index.vue b/src/views/ContainerManagement/RentIn/index.vue index 1a4bb3d7..b41a886b 100644 --- a/src/views/ContainerManagement/RentIn/index.vue +++ b/src/views/ContainerManagement/RentIn/index.vue @@ -17,11 +17,11 @@ 删除 - + 确认执行 - + 取消确认 diff --git a/src/views/baseinfo/clientflowtemplate/asd.json b/src/views/baseinfo/clientflowtemplate/asd.json new file mode 100644 index 00000000..eed70084 --- /dev/null +++ b/src/views/baseinfo/clientflowtemplate/asd.json @@ -0,0 +1,319 @@ +{ + "id": "root", + "pid": null, + "type": "start", + "name": "发起人", + "formProperties": [], + "child": { + "id": "node-o4wyo", + "pid": "root", + "type": "exclusive", + "name": "独占网关", + "child": { "id": "end", "pid": "node-o4wyo", "type": "end", "name": "结束", "child": null }, + "children": [ + { + "id": "node-f77vw", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "非南美", + "conditions": { + "logicalOperator": "and", + "conditions": [{ "field": "LaneCode", "operator": "not_equal", "value": "NM" }], + "groups": [] + }, + "child": { + "id": "node-j8u9p", + "pid": "node-f77vw", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688", "1819230545675161600", "1819230545683550209"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + }, + { + "id": "node-a22n9", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "跳过", + "conditions": { + "logicalOperator": "and", + "conditions": [ + { "field": "CustomerName", "operator": "equal", "value": "山东昊华" }, + { "field": "SourceCode", "operator": "equal", "value": "FOB-DF" } + ], + "groups": [] + }, + "child": null + }, + { + "id": "node-vnl2p", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "深圳公司", + "conditions": { + "logicalOperator": "and", + "conditions": [ + { "field": "Carrier", "operator": "not_contain", "value": "HPL,MSK" }, + { "field": "SaleOrgName", "operator": "equal", "value": "深圳昭阳" } + ], + "groups": [] + }, + "child": { + "id": "node-s1cri", + "pid": "node-vnl2p", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688", "1819230545675161601"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + }, + { + "id": "node-9uuhr", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "南美1", + "conditions": { + "logicalOperator": "and", + "conditions": [ + { "field": "LaneCode", "operator": "equal", "value": "NM" }, + { "field": "Carrier", "operator": "contains", "value": "CMA,WHL,EMC,OOCL" } + ], + "groups": [] + }, + "child": { + "id": "node-0fwjq", + "pid": "node-9uuhr", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + }, + { + "id": "node-70t5u", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "南美2", + "conditions": { + "logicalOperator": "and", + "conditions": [ + { "field": "LaneCode", "operator": "equal", "value": "NM" }, + { "field": "Carrier", "operator": "contains", "value": "HPL,ONE,PIL" } + ], + "groups": [] + }, + "child": { + "id": "node-5r9oh", + "pid": "node-70t5u", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + }, + { + "id": "node-r37dv", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "南美3", + "conditions": { + "logicalOperator": "and", + "conditions": [ + { "field": "LaneCode", "operator": "equal", "value": "NM" }, + { "field": "Carrier", "operator": "contains", "value": "MSK,CSSC,BAL" } + ], + "groups": [] + }, + "child": { + "id": "node-jh8em", + "pid": "node-r37dv", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688", "1819230545670967296"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + }, + { + "id": "node-9o4ye", + "pid": "node-o4wyo", + "type": "condition", + "def": false, + "name": "南美4", + "conditions": { + "logicalOperator": "and", + "conditions": [ + { "field": "LaneCode", "operator": "equal", "value": "NM" }, + { "field": "Carrier", "operator": "contains", "value": "MSC,COSCO,YML,HMM,ZIM" } + ], + "groups": [] + }, + "child": { + "id": "node-k8wge", + "pid": "node-9o4ye", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688", "1819230545670967297"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + }, + { + "id": "node-gbpua", + "pid": "node-o4wyo", + "type": "condition", + "def": true, + "name": "默认条件", + "conditions": { "logicalOperator": "and", "conditions": [], "groups": [] }, + "child": { + "id": "node-4qz0c", + "pid": "node-gbpua", + "type": "approval", + "name": "审批人", + "child": null, + "assigneeType": "user", + "formUser": "", + "formRole": "", + "users": ["1819230545662578688"], + "roles": [], + "leader": 1, + "choice": false, + "self": false, + "multi": "single", + "nobody": "pass", + "formProperties": [], + "operations": { + "complete": true, + "refuse": true, + "save": true, + "transfer": false, + "addMulti": false, + "minusMulti": false + } + } + } + ] + }, + "assigneeType": "role", + "roles": [ + "1750335714333167616", + "1759818143288659968", + "1816846705598009344", + "1816846763210969088", + "1816846802184441856", + "1819258968346857472" + ], + "users": [] +} diff --git a/src/views/bookingcabin/CabinManagement/columns.tsx b/src/views/bookingcabin/CabinManagement/columns.tsx index 29251f57..b2477733 100644 --- a/src/views/bookingcabin/CabinManagement/columns.tsx +++ b/src/views/bookingcabin/CabinManagement/columns.tsx @@ -602,28 +602,28 @@ export const columns: BasicColumn[] = [ title: '创建日期', align: 'center', width: 150, - dataIndex: 'createdTime', + dataIndex: 'createTime', customCell: sharedOnCell, }, { title: '创建人', align: 'center', width: 100, - dataIndex: 'createdUserName', + dataIndex: 'createUserName', customCell: sharedOnCell, }, { title: '更新日期', align: 'center', width: 150, - dataIndex: 'updatedTime', + dataIndex: 'updateTime', customCell: sharedOnCell, }, { title: '更新人', align: 'center', width: 100, - dataIndex: 'updatedUserName', + dataIndex: 'updateUserName', customCell: sharedOnCell, }, { @@ -785,12 +785,10 @@ export const detialForm: FormSchema[] = [ ], onChange: (e, obj) => { if (e && obj) { - console.log(e, obj,1) formModel.bookingSlotTypeName = obj.label } if (!obj && !e) { formModel.bookingSlotTypeName = '' - console.log(e, obj,2) } }, } diff --git a/src/views/bookingcabin/cabinBooking/columns.tsx b/src/views/bookingcabin/cabinBooking/columns.tsx index 0fc39466..35df4666 100644 --- a/src/views/bookingcabin/cabinBooking/columns.tsx +++ b/src/views/bookingcabin/cabinBooking/columns.tsx @@ -339,13 +339,13 @@ export const columns: BasicColumn[] = [ title: '订舱人', align: 'center', width: 130, - dataIndex: 'createdUserName' + dataIndex: 'createUserName' }, { title: '订舱日期', align: 'center', width: 150, - dataIndex: 'createdTime' + dataIndex: 'createTime' }, { title: '金额', diff --git a/src/views/operation/invoiceApply/api.js b/src/views/operation/invoiceApply/api.js index 0a8cf1b7..312128da 100644 --- a/src/views/operation/invoiceApply/api.js +++ b/src/views/operation/invoiceApply/api.js @@ -96,4 +96,13 @@ export function RenderTemplate(parameter) { }) } +export function InvoiceApplicationDelete(parameter) { + return request({ + url: '/feeApi/InvoiceApplication/Delete', + method: 'post', + data: parameter, + }) +} + + diff --git a/src/views/operation/invoiceApply/detail/index.vue b/src/views/operation/invoiceApply/detail/index.vue index 2e0e02a9..abf59c0b 100644 --- a/src/views/operation/invoiceApply/detail/index.vue +++ b/src/views/operation/invoiceApply/detail/index.vue @@ -50,7 +50,7 @@ import { BasicForm, useForm } from '/@/components/Form/index' import { AutoComplete } from 'ant-design-vue' import { detailForm } from '../columns' import feeTable from './feeTable.vue'; -import { InvoiceApplicationSave, InvoiceApplicationGet, GetTemplateFields, SaveTemplate, GetTemplateList } from '../api' +import { InvoiceApplicationSave, InvoiceApplicationGet, GetTemplateFields, SaveTemplate, GetTemplateList,RenderTemplate } from '../api' import { useMessage } from '/@/hooks/web/useMessage' import { useRoute } from 'vue-router' const route = useRoute() @@ -150,6 +150,12 @@ function getDetail() { } function openTempName() { nameFlag.value = true + GetTemplateList().then(res => { + tempList.value = res.data + tempList.value.forEach(item => { + item.value = item.name + }) + }) } function updateListSave() { @@ -162,6 +168,14 @@ function handleRender(){ temp = item.content } }) + const data = { + id:id.value, + template: temp + } + RenderTemplate(data).then(res=>{ + + }) + } const tempName = ref('') const tempId = ref('') diff --git a/src/views/operation/invoiceApply/index.vue b/src/views/operation/invoiceApply/index.vue index fa1d97d8..9b83a987 100644 --- a/src/views/operation/invoiceApply/index.vue +++ b/src/views/operation/invoiceApply/index.vue @@ -82,7 +82,7 @@