代码提交

This commit is contained in:
userName 2024-02-22 22:29:10 +08:00
parent 8c2208b9f3
commit eb461c7868
2 changed files with 38 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package com.ruoyi.mts.mapper;
import com.ruoyi.mts.domain.MtsPlanMain;
import com.ruoyi.mts.domain.vo.MtsPlanMainVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
/**
* 生产计划Mapper接口
@ -10,6 +11,7 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus;
* @author jiangzhe
* @date 2024-02-19
*/
@Mapper
public interface MtsPlanMainMapper extends BaseMapperPlus<MtsPlanMainMapper, MtsPlanMain, MtsPlanMainVo> {
}

View File

@ -79,7 +79,18 @@
</el-table-column> -->
<el-table-column v-for="item in dateColumns" :label="item.label" align="left" :prop="item.prop" width="110">
<template #default="scope">
<el-button link @click="handleDate(scope.column, scope.row)" style="opacity: 0;">{{ item.label }}</el-button>
<el-tooltip v-if="scope.row.record.length > 0" placement="bottom">
<template #content> 修改历史留痕:<br />
<li v-for="item in handleHistory(scope.row, scope.column) ">{{ item }}</li>
</template>
<el-button link @click="handleDate(scope.column, scope.row)">
{{ handleDateColumn(scope.row, scope.column) }}
</el-button>
</el-tooltip>
<el-button v-else link @click="handleDate(scope.column, scope.row)">
{{ handleDateColumn(scope.row, scope.column) }}
</el-button>
</template>
</el-table-column>
<!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="210">
@ -278,6 +289,30 @@ function handleChangeCellStyle({ row, column, rowIndex, columnIndex }) {
return cellStyle
}
function handleDateColumn(row, column) {
let remark = ''
if (row.record.length > 0) {
for (const item of row.record) {
if (item.recordDate == column.label) {
remark = item.remark
}
}
}
return remark
}
function handleHistory(row, column) {
let res = []
if (row.record.length > 0) {
for (const item of row.record) {
if (item.recordDate == column.label) {
res.push(item.remark)
}
}
}
return res
}
const nbsp = "&nbsp;&nbsp;&nbsp;&nbsp;"
function handleName(row) {
let res = ''