卸货地

This commit is contained in:
‘huanghaiixia’
2025-11-19 11:29:01 +08:00
parent 67daa56060
commit a2a9a6974a
6 changed files with 434 additions and 531 deletions

View File

@ -6,7 +6,7 @@
<template #notFoundContent v-if="loading"> <template #notFoundContent v-if="loading">
<span> <span>
<LoadingOutlined spin class="mr-1" /> <LoadingOutlined spin class="mr-1" />
{{ t('component.form.apiSelectNotFound') }} {{ t('加载中') }}
</span> </span>
</template> </template>
</Cascader> </Cascader>
@ -30,7 +30,8 @@
const props = defineProps({ const props = defineProps({
value: String, value: String,
excludeType: String excludeType: String,
startPCode: String
}); });
const emit = defineEmits(['change', 'defaultChange', 'update:value']); const emit = defineEmits(['change', 'defaultChange', 'update:value']);
@ -60,7 +61,7 @@
if (isChange.value) return; if (isChange.value) return;
if (val) { if (val) {
const resData = await getAreaInfo({code: val,excludeType:props.excludeType }); const resData = await getAreaInfo({code: val,excludeType:props.excludeType, startPCode: props.startPCode });
options.value = resData.areaList options.value = resData.areaList
emitData.value = resData.regionCode emitData.value = resData.regionCode
// const resData = await requestMagicApi({ // const resData = await requestMagicApi({
@ -120,7 +121,7 @@
apiData.value = []; apiData.value = [];
loading.value = true; loading.value = true;
try { try {
const res = await getAreaList({ pid: '', excludeType:props.excludeType }); const res = await getAreaList({ pid: '', excludeType:props.excludeType, startPCode: props.startPCode });
if (Array.isArray(res)) { if (Array.isArray(res)) {
apiData.value = res; apiData.value = res;
return; return;
@ -142,7 +143,8 @@
try { try {
const res = await getAreaList({ const res = await getAreaList({
[asyncFetchParamKey]: Reflect.get(targetOption, 'id'), [asyncFetchParamKey]: Reflect.get(targetOption, 'id'),
excludeType:props.excludeType excludeType:props.excludeType,
startPCode: props.startPCode
}); });
if (Array.isArray(res)) { if (Array.isArray(res)) {
@ -167,7 +169,7 @@
tree.forEach(async (item: any) => { tree.forEach(async (item: any) => {
if (item.code === id) { if (item.code === id) {
item.children = []; item.children = [];
const res = await getAreaList({ pid: item.id,excludeType:props.excludeType }); const res = await getAreaList({ pid: item.id,excludeType:props.excludeType, startPCode: props.startPCode });
item.children = res.map((child) => { item.children = res.map((child) => {
return { return {
...child, ...child,

View File

@ -77,7 +77,7 @@
title: '操作IP', title: '操作IP',
dataIndex: 'operationIp', dataIndex: 'operationIp',
key: 'operationIp', key: 'operationIp',
width: 120, width: 140,
sorter: true sorter: true
}, },
{ {

View File

@ -276,8 +276,8 @@ export const formProps: FormProps = {
key: '57d85cbf34fa475298997f5a7427bf8d', key: '57d85cbf34fa475298997f5a7427bf8d',
field: 'coefficient', field: 'coefficient',
label: '车/数量单位', label: '车/数量单位',
type: 'input', type: 'number',
component: 'Input', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
@ -292,6 +292,7 @@ export const formProps: FormProps = {
maxlength: null, maxlength: null,
prefix: '', prefix: '',
suffix: '', suffix: '',
min:0,
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false, disabled: false,
@ -362,7 +363,7 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' } { key: 3, label: 'Option 3', value: 'Option 3' }
], ],
defaultSelect: null, defaultSelect: 'Y',
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '1978057078528327681' }, params: { itemId: '1978057078528327681' },
labelField: 'name', labelField: 'name',

View File

@ -187,8 +187,7 @@
(val) => { (val) => {
let suNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'suNecSign')[0]; let suNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'suNecSign')[0];
let cuNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'cuNecSign')[0]; let cuNecSignProps = data.formDataProps.schemas?.filter((item) => item.field === 'cuNecSign')[0];
if (val.suNecSign == 'N' && !suNecSignProps.componentProps.disabled && val.suSign != 'N') return if (val.suNecSign == 'N' && !suNecSignProps.componentProps.disabled && val.suSign != 'N' && val.cuNecSign != 'N') return
if (val.cuNecSign == 'N' && !cuNecSignProps.componentProps.disabled && val.cuSign != 'N') return
if (val.suSign === 'N') { if (val.suSign === 'N') {
val.suNecSign = 'N'; val.suNecSign = 'N';
suNecSignProps.componentProps.disabled = true; suNecSignProps.componentProps.disabled = true;
@ -197,6 +196,7 @@
suNecSignProps.componentProps.disabled = false; suNecSignProps.componentProps.disabled = false;
val.suNecSign = 'Y'; val.suNecSign = 'Y';
} }
if (val.cuNecSign == 'N' && !cuNecSignProps.componentProps.disabled && val.cuSign != 'N') return
if (val.cuSign === 'N') { if (val.cuSign === 'N') {
val.cuNecSign = 'N'; val.cuNecSign = 'N';
cuNecSignProps.componentProps.disabled = true; cuNecSignProps.componentProps.disabled = true;

View File

@ -2,14 +2,14 @@ import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table'; import { BasicColumn } from '/@/components/Table';
export const formConfig = { export const formConfig = {
useCustomConfig: false, useCustomConfig: false
}; };
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'fullName', field: 'fullName',
label: '名称', label: '名称',
component: 'Input', component: 'Input'
}, },
{ {
field: 'valid', field: 'valid',
@ -21,59 +21,9 @@ export const searchFormSchema: FormSchema[] = [
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
getPopupContainer: () => document.body, getPopupContainer: () => document.body
}, }
}, }
{
field: 'code',
label: '编码',
component: 'Input',
},
{
field: 'regionCode',
label: '卸货区域',
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
labelField: 'label',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
{
field: 'addr',
label: '详细地址',
component: 'Input',
},
{
field: 'longitude',
label: '经度',
component: 'Input',
},
{
field: 'latitude',
label: '纬度',
component: 'Input',
},
{
field: 'sort',
label: '显示顺序',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'note',
label: '备注',
component: 'Input',
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -83,7 +33,7 @@ export const columns: BasicColumn[] = [
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
@ -92,7 +42,7 @@ export const columns: BasicColumn[] = [
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
@ -101,7 +51,7 @@ export const columns: BasicColumn[] = [
componentType: 'select', componentType: 'select',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
@ -110,7 +60,7 @@ export const columns: BasicColumn[] = [
componentType: 'textarea', componentType: 'textarea',
align: 'left', align: 'left',
sorter: true, sorter: true
}, },
{ {
@ -119,44 +69,8 @@ export const columns: BasicColumn[] = [
componentType: 'select', componentType: 'select',
align: 'left', align: 'left',
sorter: true, sorter: true
}, }
{
dataIndex: 'longitude',
title: '经度',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'latitude',
title: '纬度',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'sort',
title: '显示顺序',
componentType: 'number',
align: 'left',
sorter: true,
},
{
dataIndex: 'note',
title: '备注',
componentType: 'textarea',
align: 'left',
sorter: true,
},
]; ];
//表单事件 //表单事件
export const formEventConfigs = { export const formEventConfigs = {
@ -167,7 +81,7 @@ export const formEventConfigs = {
text: '开始节点', text: '开始节点',
icon: '#icon-kaishi', icon: '#icon-kaishi',
bgcColor: '#D8E5FF', bgcColor: '#D8E5FF',
isUserDefined: false, isUserDefined: false
}, },
{ {
color: '#F6AB01', color: '#F6AB01',
@ -175,8 +89,8 @@ export const formEventConfigs = {
text: '初始化表单', text: '初始化表单',
bgcColor: '#f9f5ea', bgcColor: '#f9f5ea',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
1: [ 1: [
{ {
@ -186,8 +100,8 @@ export const formEventConfigs = {
detail: '(新增无此操作)', detail: '(新增无此操作)',
bgcColor: '#F8F2FC', bgcColor: '#F8F2FC',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
2: [ 2: [
{ {
@ -196,8 +110,8 @@ export const formEventConfigs = {
text: '加载表单', text: '加载表单',
bgcColor: '#FFF1F1', bgcColor: '#FFF1F1',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
3: [ 3: [
{ {
@ -206,8 +120,8 @@ export const formEventConfigs = {
text: '提交表单', text: '提交表单',
bgcColor: '#F5F4FF', bgcColor: '#F5F4FF',
isUserDefined: false, isUserDefined: false,
nodeInfo: { processEvent: [] }, nodeInfo: { processEvent: [] }
}, }
], ],
4: [ 4: [
{ {
@ -217,9 +131,9 @@ export const formEventConfigs = {
icon: '#icon-jieshuzhiliao', icon: '#icon-jieshuzhiliao',
bgcColor: '#FFD6D6', bgcColor: '#FFD6D6',
isLast: true, isLast: true,
isUserDefined: false, isUserDefined: false
}, }
], ]
}; };
export const formProps: FormProps = { export const formProps: FormProps = {
labelCol: { span: 3, offset: 0 }, labelCol: { span: 3, offset: 0 },
@ -257,8 +171,8 @@ export const formProps: FormProps = {
isSave: false, isSave: false,
isShow: true, isShow: true,
scan: false, scan: false,
style: { width: '100%' }, style: { width: '100%' }
}, }
}, },
{ {
key: 'e4ae9d4f09fe4781926728bf71bdbebf', key: 'e4ae9d4f09fe4781926728bf71bdbebf',
@ -266,7 +180,7 @@ export const formProps: FormProps = {
label: '名称', label: '名称',
type: 'input', type: 'input',
component: 'Input', component: 'Input',
colProps: { span: 24 }, colProps: { span: 16 },
defaultValue: '', defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
@ -290,16 +204,16 @@ export const formProps: FormProps = {
isSave: false, isSave: false,
isShow: true, isShow: true,
scan: false, scan: false,
style: { width: '100%' }, style: { width: '100%' }
}, }
}, },
{ {
key: '25f8a4fdfe0948ea931c1d34748d9b10', key: '25f8a4fdfe0948ea931c1d34748d9b10',
field: 'regionCode', field: 'regionCode',
label: '卸货区域', label: '卸货区域',
type: 'select', type: 'areacascader',
component: 'XjrSelect', component: 'AreaCascader',
colProps: { span: 24 }, colProps: { span: 8 },
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
@ -307,34 +221,20 @@ export const formProps: FormProps = {
labelFixWidth: 120, labelFixWidth: 120,
responsive: false, responsive: false,
respNewRow: false, respNewRow: false,
placeholder: '请选择下拉选择', placeholder: '请选择区域',
sepTextField: '',
showLabel: true, showLabel: true,
showSearch: false,
clearable: false,
disabled: false, disabled: false,
mode: '', allowClear: true,
staticOptions: [ clearable: false,
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: true, required: true,
rules: [], rules: [],
events: {}, events: {},
isShow: true, isShow: true,
style: { width: '100%' }, style: { width: '100%' },
}, fieldNames: { label: 'fullName', value: 'code', children: 'children' },
excludeType: 'CONTINENT',
startPCode: 'CHN'
}
}, },
{ {
key: 'e622bdd456f846048d26dd3238374f92', key: 'e622bdd456f846048d26dd3238374f92',
@ -363,74 +263,68 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
style: { width: '100%' }, style: { width: '100%' }
}, }
}, },
{ {
key: 'e3de858c74fe49c08bf876f521d72b7f', key: 'e3de858c74fe49c08bf876f521d72b7f',
field: 'longitude', field: 'longitude',
label: '经度', label: '经度',
type: 'input', type: 'number',
component: 'Input', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 12 },
defaultValue: '', defaultValue: null,
componentProps: { componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix', labelWidthMode: 'fix',
labelFixWidth: 120, labelFixWidth: 120,
responsive: false, responsive: false,
respNewRow: false, width: '100%',
placeholder: '请输入经度', precision: '6',
prefix: '', span: '',
suffix: '', defaultValue: null,
addonBefore: '', min: null,
addonAfter: '', max: null,
step: 0.000001,
disabled: false, disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
controls: true,
required: false, required: false,
subTotal: false,
isShow: true,
rules: [], rules: [],
events: {}, events: {},
isSave: false, style: { width: '100%' }
isShow: true, }
scan: false,
style: { width: '100%' },
},
}, },
{ {
key: '381dd67f133b4020a7c12f6bbb0df75e', key: '381dd67f133b4020a7c12f6bbb0df75e',
field: 'latitude', field: 'latitude',
label: '纬度', label: '纬度',
type: 'input', type: 'number',
component: 'Input', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 12 },
defaultValue: '', defaultValue: null,
componentProps: { componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix', labelWidthMode: 'fix',
labelFixWidth: 120, labelFixWidth: 120,
responsive: false, responsive: false,
respNewRow: false, width: '100%',
placeholder: '请输入纬度', precision: '6',
prefix: '', span: '',
suffix: '', defaultValue: null,
addonBefore: '', min: null,
addonAfter: '', max: null,
step: 0.000001,
disabled: false, disabled: false,
allowClear: false,
showLabel: true, showLabel: true,
controls: true,
required: false, required: false,
subTotal: false,
isShow: true,
rules: [], rules: [],
events: {}, events: {},
isSave: false, style: { width: '100%' }
isShow: true, }
scan: false,
style: { width: '100%' },
},
}, },
{ {
key: 'f5cce49ce1b34d9d92891cc46c469d71', key: 'f5cce49ce1b34d9d92891cc46c469d71',
@ -438,7 +332,7 @@ export const formProps: FormProps = {
label: '显示顺序', label: '显示顺序',
type: 'number', type: 'number',
component: 'InputNumber', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 12 },
componentProps: { componentProps: {
labelWidthMode: 'fix', labelWidthMode: 'fix',
labelFixWidth: 120, labelFixWidth: 120,
@ -455,8 +349,8 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
style: { width: '100%' }, style: { width: '100%' }
}, }
}, },
{ {
key: '3e092351b52c4fc8b07cc8aae26d0c4e', key: '3e092351b52c4fc8b07cc8aae26d0c4e',
@ -464,7 +358,7 @@ export const formProps: FormProps = {
label: '有效标志', label: '有效标志',
type: 'select', type: 'select',
component: 'XjrSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 12 },
componentProps: { componentProps: {
width: '100%', width: '100%',
span: '', span: '',
@ -482,7 +376,7 @@ export const formProps: FormProps = {
staticOptions: [ staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' }, { key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' }
], ],
defaultSelect: 'Y', defaultSelect: 'Y',
datasourceType: 'dic', datasourceType: 'dic',
@ -492,7 +386,7 @@ export const formProps: FormProps = {
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: '93d735dcb7364a0f8102188ec4d77ac7'
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
@ -500,8 +394,8 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
itemId: '1978057078528327681', itemId: '1978057078528327681',
style: { width: '100%' }, style: { width: '100%' }
}, }
}, },
{ {
key: 'a5198907c3c64bcb984ceb5ff97ab57b', key: 'a5198907c3c64bcb984ceb5ff97ab57b',
@ -530,14 +424,14 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
rules: [], rules: [],
events: {}, events: {},
style: { width: '100%' }, style: { width: '100%' }
}, }
}, }
], ],
showActionButtonGroup: false, showActionButtonGroup: false,
buttonLocation: 'center', buttonLocation: 'center',
actionColOptions: { span: 24 }, actionColOptions: { span: 24 },
showResetButton: false, showResetButton: false,
showSubmitButton: false, showSubmitButton: false,
hiddenComponent: [], hiddenComponent: []
}; };

View File

@ -63,7 +63,7 @@
const filterColumns = cloneDeep(filterColumnAuth(columns)); const filterColumns = cloneDeep(filterColumnAuth(columns));
const customConfigColums =ref(filterColumns); const customConfigColums =ref(filterColumns);
const customSearchFormSchema =ref(searchFormSchema); const customSearchFormSchema =ref(searchFormSchema);
const selectedKeys = ref<string[]>([]);
const tableRef = ref(); const tableRef = ref();
//所有按钮 //所有按钮
const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]); const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]);
@ -102,7 +102,7 @@
}, },
schemas: customSearchFormSchema, schemas: customSearchFormSchema,
fieldMapToTime: [], fieldMapToTime: [],
showResetButton: false, showResetButton: true,
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id' }; return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
@ -121,13 +121,19 @@
dataIndex: 'action', dataIndex: 'action',
slots: { customRender: 'action' }, slots: { customRender: 'action' },
}, },
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
},
tableSetting: { tableSetting: {
size: false, size: false,
setting: false, setting: false,
}, },
}); });
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function dbClickRow(record) { function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) { if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return; return;