Compare commits

...

5 Commits

Author SHA1 Message Date
砂糖
505f821df0 refactor(crm): 统一搜索字段名并优化搜索功能
- 将多个页面的搜索字段统一命名为"keyword"以提高一致性
- 优化搜索按钮布局和交互,添加明确的搜索按钮
- 调整字段标签和占位文本使其更准确
- 修复合同列表导出功能中的HTML内容处理逻辑
2026-04-07 11:47:41 +08:00
砂糖
dc92939262 Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X 2026-04-07 11:43:31 +08:00
砂糖
ab9ab90ffa feat(钢卷异常管理): 新增上下板面和主缺陷字段并完善钢卷信息展示
在异常表单中增加上下板面选择器和主缺陷复选框
在多个页面表格中新增上下板面和主缺陷字段展示
在异常管理对话框和面板中增加钢卷详细信息展示
优化表单布局和部分字段标签描述
2026-04-07 11:06:09 +08:00
砂糖
38f980dbbf feat(界面): 添加刷新按钮并优化全屏对话框样式
在导航栏添加刷新按钮方便用户操作,同时优化全屏对话框的滚动和间距样式
2026-04-07 11:05:45 +08:00
砂糖
3d27e14620 feat(调拨单明细): 添加导出和刷新功能
- 在调拨单明细弹窗中添加导出按钮,支持将明细数据导出为CSV文件
- 添加刷新按钮用于重新加载明细数据
- 实现CSV导出功能,包含字段映射和中英文表头处理
2026-04-07 11:05:33 +08:00
13 changed files with 349 additions and 77 deletions

View File

@@ -944,6 +944,14 @@ body {
} }
} }
.el-dialog.is-fullscreen {
.el-dialog__body {
padding: $--spacing-lg;
max-height: calc(100vh - 100px);
overflow-y: auto;
}
}
// 抽屉 // 抽屉
.el-drawer { .el-drawer {
// background: $--metal-gradient-light; // background: $--metal-gradient-light;

View File

@@ -11,6 +11,9 @@
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
<div class="right-menu-item hover-effect" @click="refresh" title="刷新">
<el-icon class="el-icon-refresh" />
</div>
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom"> <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" /> <size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip> --> </el-tooltip> -->
@@ -86,6 +89,10 @@ export default {
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
refresh() {
window.location.reload(true)
// this.$store.dispatch('app/refresh')
},
async logout() { async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', { this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',

View File

@@ -4,8 +4,8 @@
<div class="filter-section" style="padding: 10px; border-bottom: 1px solid #e4e7ed;"> <div class="filter-section" style="padding: 10px; border-bottom: 1px solid #e4e7ed;">
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;"> <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;">
<div style="display: flex; align-items: center; gap: 4px;"> <div style="display: flex; align-items: center; gap: 4px;">
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable @keyup.enter.native="handleQuery" <el-input v-model="queryParams.keyword" placeholder="请输入关键字" clearable
style="width: 200px;" /> @keyup.enter.native="handleQuery" />
<el-button icon="el-icon-sort" size="mini" @click="toggleMoreFilter" <el-button icon="el-icon-sort" size="mini" @click="toggleMoreFilter"
:type="showMoreFilter ? 'primary' : 'default'"> :type="showMoreFilter ? 'primary' : 'default'">
<!-- {{ showMoreFilter ? '收起' : '更多' }} --> <!-- {{ showMoreFilter ? '收起' : '更多' }} -->
@@ -19,6 +19,10 @@
<div v-show="showMoreFilter" class="more-filter" <div v-show="showMoreFilter" class="more-filter"
style="margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e4e7ed;"> style="margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e4e7ed;">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px">
<el-form-item label="合同名称" prop="contractName">
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="合同编号" prop="contractNo"> <el-form-item label="合同编号" prop="contractNo">
<el-input v-model="queryParams.contractNo" placeholder="请输入合同编号" clearable <el-input v-model="queryParams.contractNo" placeholder="请输入合同编号" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />

View File

@@ -6,14 +6,17 @@
<div style="font-weight: 900;">客户列表</div> <div style="font-weight: 900;">客户列表</div>
<!-- 搜索区域 --> <!-- 搜索区域 -->
<div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;"> <div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;">
<el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入客户编码搜索" <el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入关键字搜索"
v-model="queryParams.customerCode" @change="getCustomerList" clearable></el-input> v-model="queryParams.keyword" @change="getCustomerList" clearable></el-input>
<el-button icon="el-icon-search" @click="toggleQuery"></el-button> <el-button icon="el-icon-sort" @click="toggleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" style="margin-left: 0;" size="mini" @click="getCustomerList"></el-button>
<el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"></el-button> <el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"></el-button>
</div> </div>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<div v-show="showQuery" <div v-show="showQuery"
style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;"> style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;">
<el-input style="width: 180px" placeholder="客户编码"
v-model="queryParams.customerCode" @change="getCustomerList" clearable></el-input>
<el-select style="width: 100px;" v-model="queryParams.industry" placeholder="客户行业" clearable <el-select style="width: 100px;" v-model="queryParams.industry" placeholder="客户行业" clearable
@change="getCustomerList"> @change="getCustomerList">
<el-option v-for="item in dict.type.customer_industry" :key="item.value" :label="item.label" <el-option v-for="item in dict.type.customer_industry" :key="item.value" :label="item.label"

View File

@@ -5,9 +5,10 @@
<div style="font-weight: 900;">订单列表</div> <div style="font-weight: 900;">订单列表</div>
<div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;"> <div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;">
<!-- 主搜索和添加 --> <!-- 主搜索和添加 -->
<el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入订单编号搜索" <el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入关键字搜索"
v-model="queryParams.orderCode"></el-input> v-model="queryParams.keyword" @change="getList" clearable></el-input>
<el-button icon="el-icon-search" @click="toggleQuery"></el-button> <el-button icon="el-icon-sort" @click="toggleQuery"></el-button>
<el-button type="primary" icon="el-icon-search" style="margin-left: 0;" size="mini" @click="getList"></el-button>
<el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd" <el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"
v-hasPermi="['crm:order:add']"></el-button> v-hasPermi="['crm:order:add']"></el-button>
</div> </div>
@@ -15,11 +16,13 @@
style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;"> style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;">
<!-- 查询区通过上方的查询按钮控制显示隐藏 --> <!-- 查询区通过上方的查询按钮控制显示隐藏 -->
<!-- 客户行业和客户等级的下拉选 --> <!-- 客户行业和客户等级的下拉选 -->
<el-select style="width: 100px;" v-model="queryParams.salesman" placeholder="销售员" clearable> <el-input style="width: 180px;" placeholder="订单编号"
v-model="queryParams.orderCode" @change="getList" clearable></el-input>
<el-select style="width: 100px;" v-model="queryParams.salesman" placeholder="销售员" clearable @change="getList">
<el-option v-for="item in dict.type.wip_pack_saleman" :key="item.value" :label="item.label" <el-option v-for="item in dict.type.wip_pack_saleman" :key="item.value" :label="item.label"
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
<el-select style="width: 100px;" v-model="queryParams.orderStatus" placeholder="订单状态" clearable> <el-select style="width: 100px;" v-model="queryParams.orderStatus" placeholder="订单状态" clearable @change="getList">
<el-option v-for="(value, key) in ORDER_STATUS" :key="value" :label="key" :value="value" /> <el-option v-for="(value, key) in ORDER_STATUS" :key="value" :label="key" :value="value" />
</el-select> </el-select>
</div> </div>
@@ -35,7 +38,7 @@
</div> </div>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getOrderList" /> :limit.sync="queryParams.pageSize" @pagination="getList" />
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">

View File

@@ -1,10 +1,10 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="销售员标签" prop="dictLabel"> <el-form-item label="销售员名称" prop="dictLabel">
<el-input <el-input
v-model="queryParams.dictLabel" v-model="queryParams.dictLabel"
placeholder="请输入销售员标签" placeholder="请输入销售员名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />

View File

@@ -53,18 +53,12 @@
<el-table v-loading="loading" :data="coilAbnormalList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="coilAbnormalList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="主键ID" align="center" prop="abnormalId" v-if="false" /> <el-table-column label="主键ID" align="center" prop="abnormalId" v-if="false" />
<!-- <el-table-column label="异常钢卷" align="center" prop="coilId">
<template slot-scope="scope">
<coil-no :coilId="scope.row.coilId">
{{ scope.row.coilNo }}
</coil-no>
</template>
</el-table-column> -->
<el-table-column label="位置" align="center" prop="position"> <el-table-column label="位置" align="center" prop="position">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_position" :value="scope.row.position" /> <dict-tag :options="dict.type.coil_abnormal_position" :value="scope.row.position" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上下板面" align="center" prop="plateSurface"></el-table-column>
<el-table-column label="开始位置" align="center" prop="startPosition" /> <el-table-column label="开始位置" align="center" prop="startPosition" />
<el-table-column label="结束位置" align="center" prop="endPosition" /> <el-table-column label="结束位置" align="center" prop="endPosition" />
<el-table-column label="缺陷长度" align="center" prop="length" /> <el-table-column label="缺陷长度" align="center" prop="length" />
@@ -79,17 +73,12 @@
<dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" /> <dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" />
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="判级" align="center" prop="judgeLevel"> <el-table-column label="是否为主缺陷" prop="mainMark">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_level" :value="scope.row.judgeLevel" /> <el-tag v-if="scope.row.mainMark" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="判级人" align="center" prop="judgeBy" />
<el-table-column label="判级时间" align="center" prop="judgeTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.judgeTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip /> <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -318,7 +307,7 @@ export default {
if (valid) { if (valid) {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.abnormalId != null) { if (this.form.abnormalId != null) {
updateCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => { updateCoilAbnormal({ ...this.form, length: this.form.endPosition - this.form.startPosition }).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@@ -326,7 +315,7 @@ export default {
this.buttonLoading = false; this.buttonLoading = false;
}); });
} else { } else {
addCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => { addCoilAbnormal({ ...this.form, length: this.form.endPosition - this.form.startPosition }).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();

View File

@@ -53,11 +53,14 @@
</coil-no> </coil-no>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上下板面" align="center" prop="plateSurface"></el-table-column>
<el-table-column label="位置" align="center" prop="position"> <el-table-column label="位置" align="center" prop="position">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_position" :value="scope.row.position" /> <dict-tag :options="dict.type.coil_abnormal_position" :value="scope.row.position" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始位置" align="center" prop="startPosition" /> <el-table-column label="开始位置" align="center" prop="startPosition" />
<el-table-column label="结束位置" align="center" prop="endPosition" /> <el-table-column label="结束位置" align="center" prop="endPosition" />
<el-table-column label="缺陷长度" align="center" prop="length" /> <el-table-column label="缺陷长度" align="center" prop="length" />
@@ -66,6 +69,12 @@
<dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" /> <dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否为主缺陷" prop="mainMark">
<template slot-scope="scope">
<el-tag v-if="scope.row.mainMark" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="程度" align="center" prop="degree"> <el-table-column label="程度" align="center" prop="degree">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" /> <dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" />
@@ -252,7 +261,7 @@ export default {
if (valid) { if (valid) {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.abnormalId != null) { if (this.form.abnormalId != null) {
updateCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => { updateCoilAbnormal({ ...this.form, length: this.form.endPosition - this.form.startPosition }).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@@ -260,7 +269,7 @@ export default {
this.buttonLoading = false; this.buttonLoading = false;
}); });
} else { } else {
addCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => { addCoilAbnormal({ ...this.form, length: this.form.endPosition - this.form.startPosition }).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();

View File

@@ -3,7 +3,17 @@
<el-form-item label="钢卷ID" prop="coilId" v-if="!formData.abnormalId && showCoilSelector"> <el-form-item label="钢卷ID" prop="coilId" v-if="!formData.abnormalId && showCoilSelector">
<coil-selector v-model="formData.coilId"></coil-selector> <coil-selector v-model="formData.coilId"></coil-selector>
</el-form-item> </el-form-item>
<el-form-item label="位置" prop="position"> <el-form-item label="上下版面" prop="plateSurface">
<el-radio-group v-model="formData.plateSurface">
<el-radio-button key="top" label="上">
上版面
</el-radio-button>
<el-radio-button key="bottom" label="下">
下版面
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="断面位置" prop="position">
<el-radio-group v-model="formData.position"> <el-radio-group v-model="formData.position">
<el-radio-button v-for="dict in dict.type.coil_abnormal_position" :key="dict.value" :label="dict.value">{{ <el-radio-button v-for="dict in dict.type.coil_abnormal_position" :key="dict.value" :label="dict.value">{{
dict.label }}</el-radio-button> dict.label }}</el-radio-button>
@@ -12,7 +22,7 @@
<el-form-item> <el-form-item>
<el-alert title="异常位置为内圈算起" type="info" :closable="false" show-icon size="small" /> <el-alert title="异常位置为内圈算起" type="info" :closable="false" show-icon size="small" />
</el-form-item> </el-form-item>
<el-form-item label="异常位置" required> <el-form-item label="异常区间" required>
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
<el-form-item prop="startPosition"> <el-form-item prop="startPosition">
<el-input v-model="formData.startPosition" type="number" placeholder="请输入开始位置" /> <el-input v-model="formData.startPosition" type="number" placeholder="请输入开始位置" />
@@ -41,6 +51,10 @@
:value="dict.value"></el-option> :value="dict.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="主缺陷" prop="mainMark">
<!-- 0表示否1表示是 -->
<el-checkbox v-model="formData.mainMark" :true-label="1" :false-label="0">是否为主缺陷</el-checkbox>
</el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="formData.remark" placeholder="请输入备注" /> <el-input type="textarea" v-model="formData.remark" placeholder="请输入备注" />
</el-form-item> </el-form-item>
@@ -119,6 +133,8 @@ export default {
startPosition: undefined, startPosition: undefined,
endPosition: undefined, endPosition: undefined,
length: undefined, length: undefined,
mainMark: 0,
productionLine: undefined,
defectCode: undefined, defectCode: undefined,
degree: undefined, degree: undefined,
remark: undefined remark: undefined

View File

@@ -6,7 +6,14 @@
<el-table-column label="开始位置" prop="startPosition"></el-table-column> <el-table-column label="开始位置" prop="startPosition"></el-table-column>
<el-table-column label="结束位置" prop="endPosition"></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="length"></el-table-column>
<el-table-column label="缺陷位置" prop="position"></el-table-column> <el-table-column label="上下版面" prop="plateSurface"></el-table-column>
<el-table-column label="断面位置" prop="position"></el-table-column>
<el-table-column label="是否为主缺陷" prop="mainMark">
<template slot-scope="scope">
<el-tag v-if="scope.row.mainMark" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="缺陷代码" prop="defectCode"> <el-table-column label="缺陷代码" prop="defectCode">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" /> <dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" />
@@ -21,11 +28,55 @@
<el-table-column label="备注" prop="remark"></el-table-column> <el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" plain size="mini" :loading="buttonLoading" @click="handleDelete(scope.row)">删除</el-button> <el-button type="danger" plain size="mini" :loading="buttonLoading"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="exception-section">
<h4 class="section-title">钢卷信息</h4>
<el-descriptions :column="5">
<el-descriptions-item label="入场钢卷号">{{ coilInfo.enterCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="当前钢卷号">{{ coilInfo.currentCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="厂家原料卷号">{{ coilInfo.supplierCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="逻辑库位">{{ coilInfo.warehouseName || '-' }}</el-descriptions-item>
<el-descriptions-item label="实际库区">{{ coilInfo.actualWarehouseName || '-' }}</el-descriptions-item>
<el-descriptions-item label="班组">{{ coilInfo.team || '-' }}</el-descriptions-item>
<el-descriptions-item label="材料类型">{{ coilInfo.materialType || '-' }}</el-descriptions-item>
<el-descriptions-item label="产品/原料">{{ coilInfo.itemName || '-' }}</el-descriptions-item>
<el-descriptions-item label="规格">{{ coilInfo.specification || '-' }}</el-descriptions-item>
<el-descriptions-item label="材质">{{ coilInfo.material || '-' }}</el-descriptions-item>
<el-descriptions-item label="厂家">{{ coilInfo.manufacturer || '-' }}</el-descriptions-item>
<el-descriptions-item label="镀层质量">{{ coilInfo.zincLayer || '-' }}</el-descriptions-item>
<el-descriptions-item label="表面处理">{{ coilInfo.surfaceTreatmentDesc || '-'
}}</el-descriptions-item>
<el-descriptions-item label="质量状态">{{ coilInfo.qualityStatus || '-' }}</el-descriptions-item>
<el-descriptions-item label="切边要求">{{ coilInfo.trimmingRequirement || '-'
}}</el-descriptions-item>
<el-descriptions-item label="原料材质">{{ coilInfo.packingStatus || '-' }}</el-descriptions-item>
<el-descriptions-item label="包装要求">{{ coilInfo.packagingRequirement || '-'
}}</el-descriptions-item>
<el-descriptions-item label="实测厚度(m)">{{ coilInfo.actualThickness || '-' }}
m</el-descriptions-item>
<el-descriptions-item label="实测宽度(m)">{{ coilInfo.actualWidth || '-' }}
m</el-descriptions-item>
<el-descriptions-item label="长度">{{ coilInfo.length || '-' }}
m</el-descriptions-item>
<el-descriptions-item label="毛重">{{ coilInfo.grossWeight || '-' }} t</el-descriptions-item>
<el-descriptions-item label="净重">{{ coilInfo.netWeight || '-' }} t</el-descriptions-item>
<el-descriptions-item label="调制度">{{ coilInfo.temperGrade || '-' }}</el-descriptions-item>
<el-descriptions-item label="镀层种类">{{ coilInfo.coatingType || '-' }}</el-descriptions-item>
<el-descriptions-item label="钢卷表面处理">{{ coilInfo.coilSurfaceTreatment || '-' }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{ coilInfo.remark || '-' }}</el-descriptions-item>
</el-descriptions>
</div>
<div class="exception-section"> <div class="exception-section">
<h4 class="section-title">新增异常</h4> <h4 class="section-title">新增异常</h4>
<div class="form-container"> <div class="form-container">
@@ -41,6 +92,7 @@
<script> <script>
import { addCoilAbnormal, listCoilAbnormal, delCoilAbnormal } from '@/api/wms/coilAbnormal' import { addCoilAbnormal, listCoilAbnormal, delCoilAbnormal } from '@/api/wms/coilAbnormal'
import { getMaterialCoil } from '@/api/wms/coil'
import AbnormalForm from './AbnormalForm' import AbnormalForm from './AbnormalForm'
export default { export default {
@@ -68,6 +120,7 @@ export default {
remark: null, remark: null,
productionLine: null productionLine: null
}, },
coilInfo: {},
abnormalList: [], abnormalList: [],
abnormalLoading: false, abnormalLoading: false,
buttonLoading: false, buttonLoading: false,
@@ -78,6 +131,7 @@ export default {
handler(newVal) { handler(newVal) {
this.exceptionForm.coilId = newVal this.exceptionForm.coilId = newVal
this.loadAbnormalList() this.loadAbnormalList()
this.loadCoilInfo()
}, },
immediate: true immediate: true
} }
@@ -149,6 +203,17 @@ export default {
this.buttonLoading = false this.buttonLoading = false
}) })
}) })
},
loadCoilInfo() {
if (!this.coilId) {
return
}
getMaterialCoil(this.coilId).then(response => {
this.coilInfo = response.data || {}
}).catch(error => {
console.error('查询钢卷信息失败:', error)
this.$message.error('查询钢卷信息失败: ' + (error.message || error))
})
} }
} }
} }

View File

@@ -34,12 +34,19 @@
</el-table-column> </el-table-column>
<el-table-column label="开始位置" align="center" prop="startPosition" /> <el-table-column label="开始位置" align="center" prop="startPosition" />
<el-table-column label="结束位置" align="center" prop="endPosition" /> <el-table-column label="结束位置" align="center" prop="endPosition" />
<el-table-column label="上下板面" align="center" prop="plateSurface"></el-table-column>
<el-table-column label="缺陷长度" align="center" prop="length" /> <el-table-column label="缺陷长度" align="center" prop="length" />
<el-table-column label="缺陷代码" align="center" prop="defectCode"> <el-table-column label="缺陷代码" align="center" prop="defectCode">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" /> <dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否为主缺陷" prop="mainMark">
<template slot-scope="scope">
<el-tag v-if="scope.row.mainMark" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="程度" align="center" prop="degree"> <el-table-column label="程度" align="center" prop="degree">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" /> <dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" />
@@ -57,8 +64,53 @@
@pagination="getList" /> @pagination="getList" />
<!-- 添加或修改钢卷异常信息对话框 --> <!-- 添加或修改钢卷异常信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-row>
<el-col :span="12" v-loading="coilLoading">
<el-descriptions :column="2">
<el-descriptions-item label="入场钢卷号">{{ coilInfo.enterCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="当前钢卷号">{{ coilInfo.currentCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="厂家原料卷号">{{ coilInfo.supplierCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="逻辑库位">{{ coilInfo.warehouseName || '-' }}</el-descriptions-item>
<el-descriptions-item label="实际库区">{{ coilInfo.actualWarehouseName || '-' }}</el-descriptions-item>
<el-descriptions-item label="班组">{{ coilInfo.team || '-' }}</el-descriptions-item>
<el-descriptions-item label="材料类型">{{ coilInfo.materialType || '-' }}</el-descriptions-item>
<el-descriptions-item label="产品/原料">{{ coilInfo.itemName || '-' }}</el-descriptions-item>
<el-descriptions-item label="规格">{{ coilInfo.specification || '-' }}</el-descriptions-item>
<el-descriptions-item label="材质">{{ coilInfo.material || '-' }}</el-descriptions-item>
<el-descriptions-item label="厂家">{{ coilInfo.manufacturer || '-' }}</el-descriptions-item>
<el-descriptions-item label="镀层质量">{{ coilInfo.zincLayer || '-' }}</el-descriptions-item>
<el-descriptions-item label="表面处理">{{ coilInfo.surfaceTreatmentDesc || '-'
}}</el-descriptions-item>
<el-descriptions-item label="质量状态">{{ coilInfo.qualityStatus || '-' }}</el-descriptions-item>
<el-descriptions-item label="切边要求">{{ coilInfo.trimmingRequirement || '-'
}}</el-descriptions-item>
<el-descriptions-item label="原料材质">{{ coilInfo.packingStatus || '-' }}</el-descriptions-item>
<el-descriptions-item label="包装要求">{{ coilInfo.packagingRequirement || '-'
}}</el-descriptions-item>
<el-descriptions-item label="实测厚度(m)">{{ coilInfo.actualThickness || '-' }}
m</el-descriptions-item>
<el-descriptions-item label="实测宽度(m)">{{ coilInfo.actualWidth || '-' }}
m</el-descriptions-item>
<el-descriptions-item label="长度">{{ coilInfo.length || '-' }}
m</el-descriptions-item>
<el-descriptions-item label="毛重">{{ coilInfo.grossWeight || '-' }} t</el-descriptions-item>
<el-descriptions-item label="净重">{{ coilInfo.netWeight || '-' }} t</el-descriptions-item>
<el-descriptions-item label="调制度">{{ coilInfo.temperGrade || '-' }}</el-descriptions-item>
<el-descriptions-item label="镀层种类">{{ coilInfo.coatingType || '-' }}</el-descriptions-item>
<el-descriptions-item label="钢卷表面处理">{{ coilInfo.coilSurfaceTreatment || '-' }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{ coilInfo.remark || '-' }}</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col :span="12">
<abnormal-form ref="abnormalForm" v-model="form" :show-coil-selector="false"></abnormal-form> <abnormal-form ref="abnormalForm" v-model="form" :show-coil-selector="false"></abnormal-form>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
@@ -69,6 +121,7 @@
<script> <script>
import { listCoilAbnormal, getCoilAbnormal, delCoilAbnormal, addCoilAbnormal, updateCoilAbnormal } from "@/api/wms/coilAbnormal"; import { listCoilAbnormal, getCoilAbnormal, delCoilAbnormal, addCoilAbnormal, updateCoilAbnormal } from "@/api/wms/coilAbnormal";
import { getMaterialCoil } from '@/api/wms/coil'
import AbnormalForm from '../components/AbnormalForm'; import AbnormalForm from '../components/AbnormalForm';
export default { export default {
@@ -114,6 +167,8 @@ export default {
// 表单参数 // 表单参数
form: {}, form: {},
judgeOpen: false, judgeOpen: false,
coilInfo: {},
coilLoading: false,
}; };
}, },
props: { props: {
@@ -132,6 +187,7 @@ export default {
} }
this.queryParams.coilId = newVal this.queryParams.coilId = newVal
this.handleQuery() this.handleQuery()
this.getCoilInfo()
}, },
immediate: true immediate: true
} }
@@ -146,6 +202,14 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 查询钢卷信息 */
getCoilInfo() {
this.coilLoading = true
getMaterialCoil(this.coilId).then(response => {
this.coilInfo = response.data || {}
this.coilLoading = false
})
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
@@ -208,7 +272,7 @@ export default {
if (valid) { if (valid) {
this.buttonLoading = true; this.buttonLoading = true;
if (this.form.abnormalId != null) { if (this.form.abnormalId != null) {
updateCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => { updateCoilAbnormal({ ...this.form, length: this.form.endPosition - this.form.startPosition }).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@@ -216,7 +280,7 @@ export default {
this.buttonLoading = false; this.buttonLoading = false;
}); });
} else { } else {
addCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => { addCoilAbnormal({ ...this.form, length: this.form.endPosition - this.form.startPosition }).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();

View File

@@ -144,7 +144,11 @@
</el-dialog> </el-dialog>
<el-dialog title="调拨单明细" v-loading="detailLoading" :visible.sync="detailOpen" fullscreen> <el-dialog title="调拨单明细" v-loading="detailLoading" :visible.sync="detailOpen" fullscreen>
<div style="margin-bottom: 10px; display: flex; align-items: center;">
<el-button icon="el-icon-download" type="warning" plain @click="handleExportDetail">导出</el-button>
<el-button style="margin-right: 10px;" icon="el-icon-refresh" type="success" plain @click="handleRefreshDetailList">刷新</el-button>
<coil-selector v-loading="buttonLoading" ref="coilSelector" multiple @confirm="handleCoilChange"></coil-selector> <coil-selector v-loading="buttonLoading" ref="coilSelector" multiple @confirm="handleCoilChange"></coil-selector>
</div>
<transfer-item-table :data="transferOrderItems" @refreshData="getDetailList" /> <transfer-item-table :data="transferOrderItems" @refreshData="getDetailList" />
</el-dialog> </el-dialog>
</div> </div>
@@ -231,6 +235,101 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 刷新调拨单明细列表 */
handleRefreshDetailList() {
this.getDetailList();
},
/** 导出调拨单明细 */
handleExportDetail() {
if (this.transferOrderItems.length === 0) {
this.$message({ message: '没有数据可导出', type: 'warning' });
return;
}
// 定义字段映射,英文字段名对应中文表头
const fieldMap = {
// Before相关字段
'materialTypeBeforeName': '物料类型(调拨前)',
'materialNameBefore': '物料名称(调拨前)',
'specificationBefore': '规格(调拨前)',
'materialBefore': '材质(调拨前)',
'surfaceTreatmentBefore': '表面处理(调拨前)',
'manufacturerBefore': '厂家(调拨前)',
'zincLayerBefore': '镀层质量(调拨前)',
'warehouseNameBefore': '逻辑库区(调拨前)',
// After相关字段
'materialTypeAfterName': '物料类型(调拨后)',
'materialNameAfter': '物料名称(调拨后)',
'specificationAfter': '规格(调拨后)',
'materialAfter': '材质(调拨后)',
'surfaceTreatmentAfter': '表面处理(调拨后)',
'manufacturerAfter': '厂家(调拨后)',
'zincLayerAfter': '镀层质量(调拨后)',
'warehouseNameAfter': '逻辑库区(调拨后)',
// Coil相关字段
'coil_enterCoilNo': '入库卷号',
'coil_currentCoilNo': '当前卷号',
'coil_supplierCoilNo': '厂家卷号',
// 'coil_warehouseName': '逻辑库区',
'coil_netWeight': '净重',
// 'coil_itemName': '物品名称',
// 'coil_materialType': '物料类型',
'coil_qualityStatus': '质量状态',
'coil_trimmingRequirement': '切边要求',
'coil_packingStatus': '原料材质',
'coil_packagingRequirement': '包装要求',
'coil_remark': '备注',
};
// 提取所有字段名
const exportFields = Object.keys(fieldMap);
// 准备导出数据
const exportData = this.transferOrderItems.map(item => {
const flatItem = {};
// 处理Before和After字段
exportFields.forEach(field => {
if (field.startsWith('coil_')) {
const coilField = field.replace('coil_', '');
flatItem[field] = item.coil ? item.coil[coilField] : '';
} else {
flatItem[field] = item[field] !== null && item[field] !== undefined ? item[field] : '';
}
});
return flatItem;
});
// 生成CSV头部使用中文
const chineseHeaders = Object.values(fieldMap);
const csvContent = [
chineseHeaders.join(','), // 中文头部
...exportData.map(row => {
return exportFields.map(field => {
const value = row[field];
// 处理包含逗号或引号的值
if (typeof value === 'string' && (value.includes(',') || value.includes('"'))) {
return `"${value.replace(/"/g, '""')}"`;
}
return value !== null && value !== undefined ? value : '';
}).join(',');
})
].join('\n');
// 创建Blob对象
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
// 创建下载链接
const link = document.createElement('a');
const url = URL.createObjectURL(blob);
link.setAttribute('href', url);
link.setAttribute('download', `transferOrderDetail_${new Date().getTime()}.csv`);
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
},
/** 钢卷选择器改变 */ /** 钢卷选择器改变 */
handleCoilChange(coils) { handleCoilChange(coils) {
console.log(coils); console.log(coils);

View File

@@ -5,9 +5,7 @@
<el-input v-model="filterKeyword" placeholder="输入关键词筛选" clearable @input="handleFilterChange" <el-input v-model="filterKeyword" placeholder="输入关键词筛选" clearable @input="handleFilterChange"
style="width: 200px; margin-right: 10px" /> style="width: 200px; margin-right: 10px" />
<el-select v-model="filterColumn" placeholder="选择筛选字段" @change="handleFilterChange" <el-select v-model="filterColumn" placeholder="选择筛选字段" @change="handleFilterChange"
style="width: 200px; margin-right: 10px" style="width: 200px; margin-right: 10px" multiple collapse-tags>
multiple
collapse-tags>
<el-option v-for="column in columns" :key="column.prop" :label="column.title" :value="column.prop" /> <el-option v-for="column in columns" :key="column.prop" :label="column.title" :value="column.prop" />
</el-select> </el-select>
</div> </div>
@@ -62,17 +60,24 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog title="钢卷异常信息" :visible.sync="abmornal.visible" width="50%"> <el-dialog title="钢卷异常信息" :visible.sync="abmornal.visible" width="60%">
<el-table :data="abmornal.data" style="width: 100%" v-loading="abmornal.loading"> <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="startPosition"></el-table-column>
<el-table-column label="结束位置" prop="endPosition"></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="length"></el-table-column>
<el-table-column label="上下板面" align="center" prop="plateSurface"></el-table-column>
<el-table-column label="缺陷位置" prop="position"></el-table-column> <el-table-column label="缺陷位置" prop="position"></el-table-column>
<el-table-column label="缺陷代码" prop="defectCode"> <el-table-column label="缺陷代码" prop="defectCode">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" /> <dict-tag :options="dict.type.coil_abnormal_code" :value="scope.row.defectCode" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否为主缺陷" prop="mainMark">
<template slot-scope="scope">
<el-tag v-if="scope.row.mainMark" type="success"></el-tag>
<el-tag v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="程度" prop="degree"> <el-table-column label="程度" prop="degree">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" /> <dict-tag :options="dict.type.coil_abnormal_degree" :value="scope.row.degree" />