lng计划业务逻辑处理
This commit is contained in:
@ -6,30 +6,15 @@ export const formConfig = {
|
||||
};
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'id',
|
||||
label: 'Id',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'verNo',
|
||||
label: '版本号',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'datePlan',
|
||||
label: '计划日期',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'cuCode',
|
||||
label: '客户简称',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'staCode',
|
||||
label: '气源地',
|
||||
component: 'Input',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'noTractor',
|
||||
@ -42,71 +27,37 @@ export const searchFormSchema: FormSchema[] = [
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'idNoDriver',
|
||||
label: '驾驶员身份证号',
|
||||
field: 'kName',
|
||||
label: '销售合同名称/编码',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'nameDriver',
|
||||
label: '驾驶员姓名',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'phoneDriver',
|
||||
label: '驾驶员手机号',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'idNoEscort',
|
||||
label: '押运员身份证号',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'nameEscort',
|
||||
label: '押运员姓名',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'phoneEscort',
|
||||
label: '押运员手机号',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'carrCode',
|
||||
label: '承运商',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'ksId',
|
||||
label: '销售合同',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'unloadingName',
|
||||
label: '卸货站点',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'alterSign',
|
||||
label: '变更',
|
||||
{
|
||||
field: 'staName',
|
||||
label: '气源地名称',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'approCode',
|
||||
label: '审批状态',
|
||||
component: 'Input',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
showSearch: true,
|
||||
optionFilterProp: 'label',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
options: [
|
||||
// { label: '全部', value: '' },
|
||||
],
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
dataIndex: 'id',
|
||||
title: 'Id',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'verNo',
|
||||
@ -127,7 +78,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'cuCode',
|
||||
dataIndex: 'cuSname',
|
||||
title: '客户简称',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -136,7 +87,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'staCode',
|
||||
dataIndex: 'staName',
|
||||
title: '气源地',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -217,7 +168,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'carrCode',
|
||||
dataIndex: 'carrName',
|
||||
title: '承运商',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -226,7 +177,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'ksId',
|
||||
dataIndex: 'ksName',
|
||||
title: '销售合同',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -244,7 +195,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'alterSign',
|
||||
dataIndex: 'alterName',
|
||||
title: '变更',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -253,7 +204,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'approCode',
|
||||
dataIndex: 'approName',
|
||||
title: '审批状态',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
const logId = ref('')
|
||||
const logPath = ref('/dayPlan/lngAppro/datalog');
|
||||
import { DataLog } from '/@/components/pcitc';
|
||||
import { ref, computed, onMounted, onUnmounted,
|
||||
|
||||
} from 'vue';
|
||||
import { ref, computed, onMounted, onUnmounted, } from 'vue';
|
||||
|
||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
||||
import { getLngLngApproPage, deleteLngLngAppro} from '/@/api/dayPlan/LngAppro';
|
||||
@ -66,13 +64,15 @@
|
||||
//所有按钮
|
||||
const buttons = ref([{"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":"approve","icon":"ant-design:check-outlined","isDefault":true},{"isUse":true,"name":"对比","code":"compare","icon":"ant-design:file-done-outlined","isDefault":false}]);
|
||||
//展示在列表内的按钮
|
||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']);
|
||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','compare','approve']);
|
||||
const buttonConfigs = computed(()=>{
|
||||
return filterButtonAuth(buttons.value);
|
||||
})
|
||||
|
||||
const tableButtonConfig = computed(() => {
|
||||
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
||||
let arr =[{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},]
|
||||
return arr
|
||||
// return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
||||
});
|
||||
|
||||
const actionButtonConfig = computed(() => {
|
||||
@ -82,13 +82,14 @@
|
||||
const btnEvent = {refresh : handleRefresh,view : handleView,datalog : handleDatalog,approve : handleApprove,}
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
const selectedKeys = ref([])
|
||||
const router = useRouter();
|
||||
const formIdComputedRef = ref();
|
||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||
const schemaIdComputedRef = ref();
|
||||
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const formName=' LNG调度审批';
|
||||
const formName=currentRoute.value.meta?.title;
|
||||
const [registerTable, { reload, }] = useTable({
|
||||
title: '' || (formName + '列表'),
|
||||
api: getLngLngApproPage,
|
||||
@ -119,13 +120,19 @@
|
||||
dataIndex: 'action',
|
||||
slots: { customRender: 'action' },
|
||||
},
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
onChange: onSelectChange
|
||||
},
|
||||
tableSetting: {
|
||||
size: false,
|
||||
setting: false,
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
function onSelectChange(rowKeys: string[]) {
|
||||
selectedKeys.value = rowKeys;
|
||||
}
|
||||
function dbClickRow(record) {
|
||||
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
||||
return;
|
||||
@ -255,4 +262,24 @@
|
||||
.hide{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:deep( .ant-col-8:nth-child(1)) {
|
||||
width: 320px !important;
|
||||
max-width: 320px !important;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||
width: 80px !important;
|
||||
}
|
||||
:deep( .ant-col-8:nth-child(4)) {
|
||||
width: 320px !important;
|
||||
max-width: 320px !important;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
||||
width: 130px !important;
|
||||
max-width: 130px !important;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(4) .ant-form-item-label label) {
|
||||
width: 130px !important;
|
||||
max-width: 130px !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user