代码提交
This commit is contained in:
parent
2c8b5f0a51
commit
6be2ec8054
|
@ -31,15 +31,16 @@
|
|||
</el-row>
|
||||
|
||||
<el-table v-if="refreshTable" v-loading="loading" :data="planDetailList" row-key="id" height="800"
|
||||
:default-expand-all="isExpandAll" :span-method="objectSpanMethod" :cell-style="handleChangeCellStyle">
|
||||
:default-expand-all="isExpandAll" :span-method="objectSpanMethod" :cell-style="handleChangeCellStyle" border>
|
||||
<el-table-column fixed="left" label="名称" align="left" prop="name" width="180">
|
||||
<template #default="scope">
|
||||
<!-- <template #default="scope">
|
||||
<span v-html="handleName(scope.row)"></span>
|
||||
{{ scope.row.name }}
|
||||
</template>
|
||||
<!-- <template #default="scope">
|
||||
</template> -->
|
||||
<template #default="scope">
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link">
|
||||
<span v-html="handleName(scope.row)"></span>
|
||||
{{ scope.row.name }}
|
||||
<el-icon class="el-icon--right">
|
||||
<arrow-down />
|
||||
|
@ -56,11 +57,11 @@
|
|||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划/实际" align="center" prop="flag" width="80">
|
||||
<el-table-column label="计划/实际" align="center" prop="flag" width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.rowIndex % 2 === 0 ? '实际' : '计划' }}</span>
|
||||
<span>{{ scope.row.category === 1 ? '计划' : '实际' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="计划时间" align="center" prop="planDate" width="180">
|
||||
|
@ -78,7 +79,7 @@
|
|||
<el-button link @click="handleDate(scope.row)" style="opacity: 0;">{{ item.label }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="210">
|
||||
<!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="210">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mts:planDetail:edit']">修改</el-button>
|
||||
|
@ -87,7 +88,7 @@
|
|||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mts:planDetail:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<!-- 添加或修改生产计划明细对话框 -->
|
||||
|
@ -164,6 +165,7 @@ import { ref, onMounted } from 'vue'
|
|||
import { useRoute } from 'vue-router'
|
||||
import dayjs from 'dayjs'
|
||||
import { listPlanDetail, getPlanDetail, delPlanDetail, addPlanDetail, updatePlanDetail } from "@/api/mts/planDetail";
|
||||
import { getPlanMain } from "@/api/mts/planMain";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
@ -215,8 +217,11 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
|
||||
const dateColumns = ref([])
|
||||
const allDates = [];
|
||||
onMounted(() => {
|
||||
for (const date of getDays('2024-02-01', '2024-02-25')) {
|
||||
onMounted(async () => {
|
||||
const res = await getPlanMain(route.params.mainId);
|
||||
const { startDate, endDate } = res.data
|
||||
|
||||
for (const date of getDays(startDate, endDate)) {
|
||||
allDates.push(date);
|
||||
dateColumns.value.push({
|
||||
label: date,
|
||||
|
|
Loading…
Reference in New Issue