| | |
| | | updateTmsShelf |
| | | } from "@/api/tms/tmsShelf"; |
| | | 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"; |
| | | |
| | | const {proxy} = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | |
| | | rowKey: 'id', |
| | | labelWidth: 150, |
| | | searchLabelWidth: 150, |
| | | group: [ |
| | | { |
| | | label: '基本信息', |
| | | prop: 'jbxx', |
| | | column: { |
| | | // id: { |
| | | // label: '主键ID', |
| | | // addDisplay: true, |
| | | // editDisplay: false, |
| | | // viewDisplay: true, |
| | | // hide: true, |
| | | // search: false, |
| | | // }, |
| | | systemCode: { |
| | | label: '系统编号', |
| | | addDisplay: false,minWidth:150, |
| | |
| | | ownerTeamId: { |
| | | label: '产权归属', |
| | | addDisplay: true, |
| | | editDisplay: true,minWidth:150, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | |
| | | message: "产权归属不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | serviceCode: { |
| | | label: '服务商编码', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型', multiple: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | minWidth: 150, |
| | | }, |
| | | isTransport: { |
| | | label: '是否运输服务商', |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | minWidth: 150, |
| | | }, |
| | | isStorage: { |
| | | label: '是否仓储服务商', |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | minWidth: 150, |
| | | }, |
| | | isExpress: { |
| | | label: '是否快递服务商', |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | minWidth: 150, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', minWidth: 120, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'serviceShortName', |
| | | 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] |
| | | } |
| | | getTmsServiceProvider(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | manufacturer: { |
| | | label: '生产厂商', |
| | |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '规格信息', |
| | | prop: 'ggxx', |
| | | column:{ |
| | | lengthMm: { |
| | | label: '托架长度', |
| | | addDisplay: true, |
| | |
| | | } |
| | | ], |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '状态信息', |
| | | prop: 'ztxx', |
| | | column: { |
| | | isInUse: { |
| | | label: '是否在用',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', |
| | |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '其他信息', |
| | | prop: 'qtxq', |
| | | column: { |
| | | status: { |
| | | label: '状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable', |
| | |
| | | search: false, |
| | | }, |
| | | } |
| | | } |
| | | ], |
| | | column: { |
| | | systemCode: { |
| | | label: '系统编号',display: false,minWidth:150, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | shelfCode: { |
| | | label: '托架编号',display: false,minWidth:150, |
| | | |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | shelfType: { |
| | | label: '托架类型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/shelf_type', |
| | | display: false,minWidth:150, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | ownerTeamName: { |
| | | label: '产权归属',display: false,minWidth:150, |
| | | |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | manufacturer: { |
| | | label: '生产厂商',minWidth:150, |
| | | display: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | maxLoadKg: { |
| | | label: '承载重量',append:'Kg', |
| | | display: false,minWidth:150, |
| | | hide: false, |
| | | }, |
| | | compatibleContainerType: { |
| | | label: '适配集装箱类型', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_type', |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | }, |
| | | isInUse: { |
| | | label: '是否在用',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | display: false,minWidth:150, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | maintenanceStatus: { |
| | | label: '维护状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/maintenance_status', |
| | | display: false,minWidth:150, |
| | | hide: false, |
| | | search: true, |
| | | |
| | | }, |
| | | status: { |
| | | label: '状态',dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable', |
| | | display: false, |
| | | hide: false,minWidth:150, |
| | | search: true, |
| | | }, |
| | | |
| | | updateBy: { |
| | | label: '更新人',display: false,minWidth:150, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | updateTime: { |
| | | label: '更新时间', |
| | | display: false,minWidth:180, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | const { |
| | |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | | onMounted(() => { |
| | | watch(() => form.value.ownerTeamId, () => { |
| | | |
| | | if (!form.value.ownerTeamId){ |
| | | return; |
| | | } |
| | | 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.serviceShortName, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | </script> |