feat(wms/report): 添加差值计算和异常信息展示功能

refactor(wms/report): 替换合计信息为差值显示
feat(wms/coil): 增加创建时间和创建人字段
feat(crm/contract): 添加合同导出按钮
This commit is contained in:
砂糖
2026-03-31 18:37:17 +08:00
parent abcc644f74
commit 0223102269
10 changed files with 161 additions and 42 deletions

View File

@@ -48,6 +48,12 @@
<template v-else-if="column.prop === 'productionDuration'">
{{ formatProductionDuration(scope.row.productionDuration) }}
</template>
<!-- 质量状态点击后会出现弹窗显示详细信息 -->
<template v-else-if="column.prop === 'qualityStatus'">
<div @click="handleQualityStatusClick(scope.row)" style="cursor: pointer; background-color: #f5f7fa;">
<dict-tag :options="dict.type.coil_quality_status" :value="scope.row.qualityStatus"></dict-tag>
</div>
</template>
<!-- 默认渲染 -->
<template v-else>
{{ scope.row[column.prop] }}
@@ -55,6 +61,27 @@
</template>
</el-table-column>
</el-table>
<el-dialog title="钢卷异常信息" :visible.sync="abmornal.visible" width="50%">
<el-table :data="abmornal.data" style="width: 100%" v-loading="abmornal.loading">
<el-table-column label="开始位置" prop="startPosition"></el-table-column>
<el-table-column label="结束位置" prop="endPosition"></el-table-column>
<el-table-column label="长度" prop="length"></el-table-column>
<el-table-column label="缺陷位置" prop="position"></el-table-column>
<el-table-column label="缺陷代码" prop="defectCode">
<template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" />
</template>
</el-table-column>
<el-table-column label="程度" prop="degree">
<template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" />
</template>
</el-table-column>
<el-table-column label="产线" prop="productionLine"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@@ -63,6 +90,8 @@ import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
import { listCoilAbnormal } from '@/api/wms/coilAbnormal'
export default {
name: 'CoilTable',
components: {
@@ -80,6 +109,7 @@ export default {
default: () => [],
},
},
dicts: ['coil_quality_status', 'coil_abnormal_code', 'coil_abnormal_degree'],
data() {
return {
pageNum: 1,
@@ -90,6 +120,11 @@ export default {
// 筛选相关
filterKeyword: '',
filterColumn: [],
abmornal: {
visible: false,
data: {},
loading: false,
}
}
},
mounted() {
@@ -201,6 +236,20 @@ export default {
// 处理排序规则变化
handleSortChange() {
this.pageNum = 1
},
handleQualityStatusClick(row) {
this.abmornal.visible = true
this.abmornal.loading = true
listCoilAbnormal({
coilId: row.coilId
}).then(response => {
this.abmornal.data = response.rows || []
}).catch(error => {
console.error('查询异常记录失败:', error)
this.$message.error('查询异常记录失败: ' + (error.message || error))
}).finally(() => {
this.abmornal.loading = false
})
}
}
}