| | |
| | | updateTmsContainer |
| | | } from "@/api/tms/tmsContainer"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed, reactive, ref, toRefs} from "vue"; |
| | | import {computed, onMounted, reactive, ref, toRefs, watch} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | | import {getTmsServiceProvider, listTmsServiceProvider} from "@/api/tms/tmsServiceProvider"; |
| | | import {getTmsSettlementEntity, listTmsSettlementEntity} from "@/api/tms/tmsSettlementEntity"; |
| | | |
| | | const {proxy} = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | |
| | | const option = ref({ |
| | | pageKey: 'TmsContainer', |
| | | rowKey: 'id', |
| | | labelWidth: 150, |
| | | searchLabelWidth: 150, |
| | | labelWidth: 130, |
| | | searchLabelWidth: 100, |
| | | group:[ |
| | | { |
| | | label: '基本信息', |
| | | prop: 'jbxx', |
| | | column:{ |
| | | systemCode: { |
| | | label: '系统编号', |
| | | addDisplay: false, |
| | | editDisplay: true, disabled: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "系统编号不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | selfLeasType: { |
| | | label: '自租类型', |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/self_leas_type', |
| | | addDisplay: true, |
| | | editDisplay: true,minWidth:150, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "自租类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | containerCode: { |
| | | label: '集装箱号', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "集装箱号不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | containerUseType: { |
| | | label: '集装箱用途类型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_use_type', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150,searchLabelWidth:120, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "集装箱用途类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | containerSize: { |
| | | label: '箱型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_type', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "箱型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | ownerTeamId: { |
| | | label: '产权归属', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150,dataType: 'string', |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "产权归属不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search', |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('ownerTeamId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | ownerTeamId: active.id, |
| | | ownerTeamName: active.customerShortName, |
| | | }); |
| | | } |
| | | }, |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | customerType: { |
| | | label: '客户类型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type', |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | }, |
| | | customerShortName: { |
| | | label: '客户简称', |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | }, |
| | | customerCode: { |
| | | label: '客户编号', |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'customerShortName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsSettlementEntity(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsSettlementEntity({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | manufacturer: { |
| | | label: '生产厂商', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:180, |
| | | search: false, |
| | | }, |
| | | manufactureDate: { |
| | | label: '生产日期', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '规格信息', |
| | | prop: 'ggxx', |
| | | column:{ |
| | | lengthMm: { |
| | | label: '集装箱长度', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'mm', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | widthMm: { |
| | | label: '集装箱宽度', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'mm', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | heightMm: { |
| | | label: '集装箱高度', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'mm', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | maxTotalWeightKg: { |
| | | label: '最大总重', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'Kg', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | maxLoadKg: { |
| | | label: '最大载重', |
| | | addDisplay: true,append:'Kg', |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | volumeM3: { |
| | | label: '容积', |
| | | addDisplay: true,append:'m³', |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '状态信息', |
| | | prop: 'ztxx', |
| | | column: { |
| | | isInUse: { |
| | | label: '是否在用',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否在用不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | maintenanceStatus: { |
| | | label: '维护状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/maintenance_status', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "维护状态不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | lastMaintenanceDate: { |
| | | label: '最近维护日期', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | nextMaintenanceDate: { |
| | | label: '下次维护日期', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '其他信息', |
| | | prop: 'qtyxx', |
| | | column: { |
| | | status: { |
| | | label: '状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "状态不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | createBy: { |
| | | label: '创建人', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "创建时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | updateBy: { |
| | | label: '更新人', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | search: false, |
| | | }, |
| | | updateTime: { |
| | | label: '更新时间', |
| | | type: 'date', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true,minWidth:180, |
| | | hide: false, |
| | | search: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "更新时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | remark: { |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | addDisplay: true, |
| | | editDisplay: true,span:24, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | } |
| | | ], |
| | | column: { |
| | | // id: { |
| | | // label: '主键ID', |
| | | // addDisplay: true, |
| | | // editDisplay: false, |
| | | // viewDisplay: true, |
| | | // hide: true, |
| | | // search: false, |
| | | // }, |
| | | systemCode: { |
| | | label: '系统编号', |
| | | addDisplay: false, |
| | | editDisplay: true, disabled: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "系统编号不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | selfLeasType: { |
| | | label: '自租类型', |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/self_leas_type', |
| | | hide: false, display: false, |
| | | search: true, |
| | | }, |
| | | containerCode: { |
| | | label: '集装箱号', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "集装箱号不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | containerUseType: { |
| | | label: '集装箱用途类型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_use_type', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false,minWidth:150, |
| | | display: false, |
| | | hide: false,minWidth:150,searchLabelWidth:120, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "集装箱用途类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | containerSize: { |
| | | label: '箱型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_type', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "箱型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | ownerTeamId: { |
| | | ownerTeamName: { |
| | | label: '产权归属', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "产权归属不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | manufacturer: { |
| | | label: '生产厂商', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:180, |
| | | search: false, |
| | | }, |
| | | manufactureDate: { |
| | | label: '生产日期', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | lengthMm: { |
| | | label: '集装箱长度', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'mm', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | widthMm: { |
| | | label: '集装箱宽度', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'mm', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | heightMm: { |
| | | label: '集装箱高度', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'mm', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | maxTotalWeightKg: { |
| | | label: '最大总重', |
| | | addDisplay: true, |
| | | editDisplay: true,append:'Kg', |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | maxLoadKg: { |
| | | label: '最大载重', |
| | | addDisplay: true,append:'Kg', |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | volumeM3: { |
| | | label: '容积', |
| | | addDisplay: true,append:'m³', |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | isInUse: { |
| | | label: '是否在用',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否在用不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | maintenanceStatus: { |
| | | label: '维护状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/maintenance_status', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "维护状态不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | lastMaintenanceDate: { |
| | | label: '最近维护日期', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | nextMaintenanceDate: { |
| | | label: '下次维护日期', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | status: { |
| | | label: '状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "状态不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | createBy: { |
| | | label: '创建人', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', |
| | | type: 'date', valueFormat: 'YYYY-MM-DD', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "创建时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | |
| | | updateBy: { |
| | | label: '更新人', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: false, |
| | | }, |
| | | updateTime: { |
| | | label: '更新时间', |
| | | type: 'date', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true,minWidth:180, |
| | | display: false,minWidth:180, |
| | | hide: false, |
| | | search: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "更新时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | remark: { |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | addDisplay: true, |
| | | editDisplay: true,span:24, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | search: false |
| | | }, |
| | | } |
| | | }) |