Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
<el-input v-model="queryParams.templateName" placeholder="请输入方案名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案单位" prop="templateUnit">
|
||||
<el-select v-model="queryParams.templateUnit" placeholder="请选择方案单位" clearable filterable allow-create @keyup.enter.native="handleQuery">
|
||||
<el-option v-for="unit in templateUnitOptions" :key="unit" :label="unit" :value="unit" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@@ -17,19 +22,28 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table highlight-current-row border @row-click="handleRowClick" v-loading="loading"
|
||||
:data="inspectionItemTemplateList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="方案名称" align="center" prop="templateName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
<div class="template-list" v-loading="loading">
|
||||
<div
|
||||
v-for="item in inspectionItemTemplateList"
|
||||
:key="item.templateId"
|
||||
class="template-item"
|
||||
:class="{ 'active': currentTemplate && currentTemplate.templateId === item.templateId }"
|
||||
@click="handleRowClick(item)"
|
||||
>
|
||||
<div class="template-item-header">
|
||||
<span class="template-item-title">{{ item.templateName }}</span>
|
||||
<div class="template-item-actions">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(item)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(item)">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-item-meta">
|
||||
<span class="template-unit">所属单位:{{ item.templateUnit || '-' }}</span>
|
||||
</div>
|
||||
<div v-if="item.templateDesc" class="template-item-desc">{{ item.templateDesc }}</div>
|
||||
</div>
|
||||
<el-empty v-if="inspectionItemTemplateList.length === 0" description="暂无数据" :image-size="100" />
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改待检项方案对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
@@ -37,6 +51,11 @@
|
||||
<el-form-item label="方案名称" prop="templateName">
|
||||
<el-input v-model="form.templateName" placeholder="请输入方案名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案单位" prop="templateUnit">
|
||||
<el-select v-model="form.templateUnit" placeholder="请选择方案单位" filterable allow-create>
|
||||
<el-option v-for="unit in templateUnitOptions" :key="unit" :label="unit" :value="unit" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="方案描述" prop="templateDesc">
|
||||
<el-input v-model="form.templateDesc" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
@@ -154,35 +173,34 @@ export default {
|
||||
CheckItemTransfer,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 待检项方案表格数据
|
||||
inspectionItemTemplateList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
templateName: undefined,
|
||||
templateDesc: undefined,
|
||||
inspectionItem: undefined,
|
||||
},
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 待检项方案表格数据
|
||||
inspectionItemTemplateList: [],
|
||||
// 方案单位选项
|
||||
templateUnitOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
templateName: undefined,
|
||||
templateUnit: undefined,
|
||||
templateDesc: undefined,
|
||||
inspectionItem: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@@ -190,6 +208,7 @@ export default {
|
||||
},
|
||||
checkItemList: [],
|
||||
rightLoading: false,
|
||||
isRowClicking: false,
|
||||
currentTemplate: null,
|
||||
addItemOpen: false,
|
||||
addItemForm: {
|
||||
@@ -214,17 +233,27 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInspectionItemTemplate(this.queryParams).then(response => {
|
||||
this.inspectionItemTemplateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.inspectionItemTemplateList = response.rows || response.data || response;
|
||||
const units = [...new Set(this.inspectionItemTemplateList.map(item => item.templateUnit).filter(Boolean))];
|
||||
this.templateUnitOptions = units.sort();
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleRowClick(row) {
|
||||
if (this.isRowClicking) {
|
||||
this.$message.info('正在查看数据,请稍后');
|
||||
return;
|
||||
}
|
||||
this.isRowClicking = true;
|
||||
this.currentTemplate = row;
|
||||
this.rightLoading = true;
|
||||
getInfoByInspectionItem(row.inspectionItem).then(response => {
|
||||
this.checkItemList = response.data || [];
|
||||
this.rightLoading = false;
|
||||
this.isRowClicking = false;
|
||||
}).catch(() => {
|
||||
this.rightLoading = false;
|
||||
this.isRowClicking = false;
|
||||
});
|
||||
},
|
||||
loadAvailableCheckItems() {
|
||||
@@ -339,7 +368,6 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
@@ -425,3 +453,113 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.template-list {
|
||||
height: calc(100vh - 200px);
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
background: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.template-item {
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.template-item:hover {
|
||||
border-color: #409eff;
|
||||
box-shadow: 0 4px 16px rgba(64, 158, 255, 0.15);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.template-item.active {
|
||||
border-color: #409eff;
|
||||
background: linear-gradient(135deg, #ecf5ff 0%, #f0f7ff 100%);
|
||||
box-shadow: 0 4px 20px rgba(64, 158, 255, 0.25);
|
||||
}
|
||||
|
||||
.template-item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.template-item-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.template-item-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.template-item:hover .template-item-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.template-item.active .template-item-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.template-item-meta {
|
||||
font-size: 13px;
|
||||
color: #67c23a;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.template-unit {
|
||||
padding: 2px 8px;
|
||||
background: #f0f9eb;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.template-item-desc {
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
line-height: 1.5;
|
||||
padding-top: 10px;
|
||||
margin-top: 10px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
/* 滚动条样式 */
|
||||
.template-list::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.template-list::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.template-list::-webkit-scrollbar-thumb {
|
||||
background: #c1c1c1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.template-list::-webkit-scrollbar-thumb:hover {
|
||||
background: #a8a8a8;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -426,7 +426,7 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.grind-page { background: #f4f5f7; height: 100%; }
|
||||
.grind-layout { display: flex; gap: 12px; height: 100%; align-items: flex-start; }
|
||||
.grind-layout { display: flex; gap: 12px; height: 100%; }
|
||||
|
||||
/* 左侧 */
|
||||
.grind-left { width: 240px; flex-shrink: 0; }
|
||||
@@ -440,7 +440,11 @@ export default {
|
||||
|
||||
/* 辊列表 */
|
||||
.roll-filter { padding: 0 0 4px; }
|
||||
.roll-list { overflow-y: auto; flex: 1; margin: 0 -12px; }
|
||||
::v-deep .el-card .el-card__body {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.roll-list { overflow-y: auto; flex: 1; min-height: 0; padding: 0; }
|
||||
.roll-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f2f5; }
|
||||
.roll-item:hover { background: #f5f7fa; }
|
||||
.roll-item--active { background: #e8f4ff !important; border-left: 3px solid #409eff; }
|
||||
|
||||
@@ -94,7 +94,7 @@ public class WmsMaterialCoilController extends BaseController {
|
||||
* 独立的统计接口,使用与分页列表相同的查询条件
|
||||
*/
|
||||
@PostMapping("/statisticsList")
|
||||
public R<Map<String, BigDecimal>> getStatistics(WmsMaterialCoilBo bo) {
|
||||
public R<Map<String, BigDecimal>> getStatistics(@RequestBody WmsMaterialCoilBo bo) {
|
||||
return R.ok(iWmsMaterialCoilService.getStatistics(bo));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ public class WmsBonusPool extends BaseEntity {
|
||||
*/
|
||||
@TableId(value = "pool_id")
|
||||
private Long poolId;
|
||||
/**
|
||||
* 奖金池名称
|
||||
*/
|
||||
private String poolName;
|
||||
/**
|
||||
* 产线
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,11 @@ public class WmsBonusPoolBo extends BaseEntity {
|
||||
*/
|
||||
private Long poolId;
|
||||
|
||||
/**
|
||||
* 奖金池名称
|
||||
*/
|
||||
private String poolName;
|
||||
|
||||
/**
|
||||
* 产线
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,12 @@ public class WmsBonusPoolVo extends BaseEntity {
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long poolId;
|
||||
|
||||
/**
|
||||
* 奖金池名称
|
||||
*/
|
||||
@ExcelProperty(value = "奖金池名称")
|
||||
private String poolName;
|
||||
|
||||
/**
|
||||
* 产线
|
||||
*/
|
||||
|
||||
@@ -61,6 +61,7 @@ public class WmsBonusPoolServiceImpl implements IWmsBonusPoolService {
|
||||
private LambdaQueryWrapper<WmsBonusPool> buildQueryWrapper(WmsBonusPoolBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsBonusPool> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPoolName()), WmsBonusPool::getPoolName, bo.getPoolName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProductionLine()), WmsBonusPool::getProductionLine, bo.getProductionLine());
|
||||
lqw.eq(bo.getBonusTime() != null, WmsBonusPool::getBonusTime, bo.getBonusTime());
|
||||
lqw.eq(bo.getBonusStartTime() != null, WmsBonusPool::getBonusStartTime, bo.getBonusStartTime());
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
<resultMap type="com.klp.domain.WmsBonusPool" id="WmsBonusPoolResult">
|
||||
<result property="poolId" column="pool_id"/>
|
||||
<result property="poolName" column="pool_name"/>
|
||||
<result property="productionLine" column="production_line"/>
|
||||
<result property="bonusTime" column="bonus_time"/>
|
||||
<result property="bonusStartTime" column="bonus_start_time"/>
|
||||
|
||||
Reference in New Issue
Block a user