|
@ -32,6 +32,10 @@ |
|
|
<span>{{ row.code }}</span> |
|
|
<span>{{ row.code }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<template v-for="item in dateColumns" :key="item.field" #[item.field]="{row}"> |
|
|
|
|
|
<div v-if="row[item.field]?.isDay == 'TRUE'">白班</div> |
|
|
|
|
|
<div v-if="row[item.field]?.isNight == 'TRUE'">夜班</div> |
|
|
|
|
|
</template> |
|
|
<template #action="{ row }"> |
|
|
<template #action="{ row }"> |
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
</template> |
|
|
</template> |
|
@ -65,6 +69,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
import * as SupplierDeliMainApi from '@/api/wms/supplierDeliMain' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'DeliveryCalendar' }) |
|
|
defineOptions({ name: 'DeliveryCalendar' }) |
|
|
|
|
|
|
|
@ -74,6 +79,7 @@ const { t } = useI18n() // 国际化 |
|
|
const route = useRoute() // 路由信息 |
|
|
const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
|
|
|
const orginTableColumns = ref(DeliveryCalendar.allSchemas.tableColumns) |
|
|
const tableColumns = ref(DeliveryCalendar.allSchemas.tableColumns) |
|
|
const tableColumns = ref(DeliveryCalendar.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
@ -89,9 +95,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
// const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
// tableColumns.value = val |
|
|
} |
|
|
// } |
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
getListApi: DeliveryCalendarApi.getDeliveryCalendarPage // 分页接口 |
|
|
getListApi: DeliveryCalendarApi.getDeliveryCalendarPage // 分页接口 |
|
@ -238,8 +244,42 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { tableObject:tableObjectHead, tableMethods:tableMethodsHead } = useTable({ |
|
|
|
|
|
getListApi: SupplierDeliMainApi.getPageTableHead // 分页接口 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|
|
|
const { getList: getListHead, setSearchParams: setSearchParamsHead } = tableMethodsHead |
|
|
|
|
|
const dateColumns = ref([]) |
|
|
|
|
|
watch(()=>tableObjectHead.tableList,()=>{ |
|
|
|
|
|
updateDateTableColumns() |
|
|
|
|
|
},{deep:true}) |
|
|
|
|
|
const updateDateTableColumns = ()=>{ |
|
|
|
|
|
console.log('tableObjectHead', tableObjectHead) |
|
|
|
|
|
dateColumns.value = [] |
|
|
|
|
|
if(tableObjectHead.tableList.length>10){ |
|
|
|
|
|
tableObjectHead.tableList.forEach(item=>{ |
|
|
|
|
|
dateColumns.value.push({ |
|
|
|
|
|
width:120, |
|
|
|
|
|
field: item, |
|
|
|
|
|
label: item |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
tableObjectHead.tableList.forEach(item=>{ |
|
|
|
|
|
dateColumns.value.push({ |
|
|
|
|
|
field: item, |
|
|
|
|
|
label: item |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
tableColumns.value = [...orginTableColumns.value,...dateColumns.value] |
|
|
|
|
|
console.log('tableColumns',tableColumns.value) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
|
|
|
getListHead() |
|
|
getList() |
|
|
getList() |
|
|
importTemplateData.templateUrl = await DeliveryCalendarApi.importTemplate() |
|
|
importTemplateData.templateUrl = await DeliveryCalendarApi.importTemplate() |
|
|
}) |
|
|
}) |
|
|