feat: 多模块新增功能与优化体验
1. 隐藏客户录入页的客户编码字段 2. 为WmsMaterialWarningBo添加日期格式化注解 3. 合同产品选择时自动匹配默认材质 4. 物料告警页新增今日筛选、行样式区分与偏差率展示优化 5. 合同页新增快速新增客户功能
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="告警类型" prop="warningType">
|
||||
<el-radio-group v-model="queryParams.warningType" @change="handleQuery">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="LENGTH">长度告警</el-radio-button>
|
||||
<el-radio-button label="THICKNESS">厚度告警</el-radio-button>
|
||||
</el-radio-group>
|
||||
@@ -32,6 +31,9 @@
|
||||
<el-form-item label="处理人" prop="handleBy">
|
||||
<el-input v-model="queryParams.handleBy" placeholder="请输入处理人" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="只看今天" prop="onlyToday">
|
||||
<el-switch v-model="queryParams.onlyToday" @change="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -40,7 +42,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="materialWarningList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="materialWarningList" @selection-change="handleSelectionChange" :row-class-name="getRowClassName">
|
||||
<!-- <el-table-column label="钢卷ID" align="center" prop="coilId" /> -->
|
||||
<el-table-column label="告警类型" align="center" prop="warningType">
|
||||
<template slot-scope="scope">
|
||||
@@ -64,9 +66,14 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="理论值" align="center" prop="theoreticalVal" />
|
||||
<el-table-column label="实测值" align="center" prop="actualVal" />
|
||||
<el-table-column label="允许偏差" align="center" prop="allowDeviation" />
|
||||
<el-table-column label="允许偏差" align="center" prop="allowDeviation">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.warningType === 'LENGTH'">{{ parseFloat((scope.row.allowDeviation * 100).toFixed(2)) }}%</span>
|
||||
<span v-else>{{ scope.row.allowDeviation }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际偏差值" align="center" prop="deviationValue" />
|
||||
<el-table-column label="偏差率(%)" align="center" prop="deviationRate" />
|
||||
|
||||
<el-table-column label="告警说明" align="center" prop="warningMsg" show-overflow-tooltip />
|
||||
<el-table-column label="告警状态" align="center" prop="warningStatus">
|
||||
<template slot-scope="scope">
|
||||
@@ -178,7 +185,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
coilId: undefined,
|
||||
warningType: '',
|
||||
warningType: 'LENGTH',
|
||||
theoreticalVal: undefined,
|
||||
actualVal: undefined,
|
||||
allowDeviation: undefined,
|
||||
@@ -190,6 +197,9 @@ export default {
|
||||
handleBy: undefined,
|
||||
handleTime: undefined,
|
||||
handleRemark: undefined,
|
||||
onlyToday: true,
|
||||
createStartTime: undefined,
|
||||
createEndTime: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -260,6 +270,17 @@ export default {
|
||||
/** 查询钢卷告警列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
if (this.queryParams.onlyToday) {
|
||||
const today = new Date();
|
||||
const y = today.getFullYear();
|
||||
const m = String(today.getMonth() + 1).padStart(2, '0');
|
||||
const d = String(today.getDate()).padStart(2, '0');
|
||||
this.queryParams.createStartTime = `${y}-${m}-${d} 00:00:00`;
|
||||
this.queryParams.createEndTime = `${y}-${m}-${d} 23:59:59`;
|
||||
} else {
|
||||
this.queryParams.createStartTime = undefined;
|
||||
this.queryParams.createEndTime = undefined;
|
||||
}
|
||||
listMaterialWarning(this.queryParams).then(response => {
|
||||
this.materialWarningList = response.rows;
|
||||
this.total = response.total;
|
||||
@@ -278,6 +299,12 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 行样式区分长度告警和厚度告警 */
|
||||
getRowClassName({ row }) {
|
||||
if (row.warningType === 'LENGTH') return 'warning-row-length';
|
||||
if (row.warningType === 'THICKNESS') return 'warning-row-thickness';
|
||||
return '';
|
||||
},
|
||||
/** 判断是否是今天的 */
|
||||
isToday(date) {
|
||||
const today = new Date();
|
||||
@@ -417,3 +444,11 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-table .warning-row-length {
|
||||
background-color: #fdf6ec;
|
||||
}
|
||||
.el-table .warning-row-thickness {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user