feat(wms): 新增原料材质与钢卷类型不匹配查询及修复功能

refactor(crm): 重构销售员管理界面为左右分栏布局

style(wms): 优化钢卷发货状态显示为单选按钮组

chore: 新增考勤请求工具类文件
This commit is contained in:
2026-04-21 15:44:38 +08:00
parent e44235abd8
commit a8e667a69b
5 changed files with 248 additions and 212 deletions

View File

@@ -40,10 +40,15 @@
</el-form-item>
<el-form-item v-if="showWaybill" label="发货状态">
<el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable>
<el-radio-group v-model="queryParams.status" @change="handleQuery">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="0">未发货{{ unshippedCount }}</el-radio-button>
<el-radio-button label="1">已发货{{ shippedCount }}</el-radio-button>
</el-radio-group>
<!-- <el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable>
<el-option :value="0" label="未发货">未发货</el-option>
<el-option :value="1" label="已发货">已发货</el-option>
</el-select>
</el-select> -->
</el-form-item>
<el-form-item v-if="showWaybill" label="发货单时间">
@@ -61,12 +66,12 @@
<el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button>
</el-form-item>
<el-form-item style="float: right;" v-if="showWaybill" v-loading="loading">
<!-- <el-form-item style="float: right;" v-if="showWaybill" v-loading="loading">
<el-descriptions :column="2" border>
<el-descriptions-item label="已发货数量">{{ shippedCount }}</el-descriptions-item>
<el-descriptions-item label="未发货数量">{{ unshippedCount }}</el-descriptions-item>
</el-descriptions>
</el-form-item>
</el-form-item> -->
</el-form>
<el-row :gutter="10" class="mb8" v-if="showControl">
@@ -803,7 +808,7 @@ export default {
parentCoilNos: undefined,
itemId: undefined,
itemIds: undefined,
status: undefined,
status: '',
updateTime: undefined,
orderBy: false,
...this.querys,
@@ -1201,6 +1206,9 @@ export default {
listBoundCoil({ ...query, status: 1 }).then(res => {
this.shippedCount = res.total;
})
getCoilStatisticsList(query).then(res => {
this.statistics = res.data || [];
})
return;
}
listMaterialCoil(query).then(response => {

View File

@@ -1,17 +1,17 @@
<template>
<div class="app-container" v-loading="loading" >
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportAll">导出</el-button>
</el-col>
<el-col :span="1.5">
{{ totalCoil }}
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div class="app-container" v-loading="loading">
<div style="display: flex; align-items: center; justify-content: flex-start; gap: 10px;">
<el-radio-group v-model="activeTab" @change="handleRefresh">
<el-radio-button label="missing">类型缺失</el-radio-button>
<el-radio-button label="mismatch">匹配异常</el-radio-button>
</el-radio-group>
<KLPTable :data="materialCoilList" @selection-change="handleSelectionChange" :floatLayer="true"
:floatLayerConfig="floatLayerConfig">
<el-button type="success" plain size="mini" icon="el-icon-refresh" @click="handleRefresh">刷新</el-button>
</div>
<KLPTable :data="materialCoilList" @selection-change="handleSelectionChange" height="calc(100vh - 220px)"
:floatLayer="true" :floatLayerConfig="floatLayerConfig">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
<template slot-scope="scope">
@@ -37,7 +37,7 @@
<el-table-column label="更新时间" align="center" prop="updateTime" />
<el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" prop="action" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)">修正</el-button>
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePreviewLabel(scope.row)">
@@ -47,12 +47,14 @@
打印标签
</el-button>
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">追溯</el-button>
<el-button v-if="activeTab === 'mismatch'" size="mini" type="text" icon="el-icon-close"
@click="handleFixType(scope.row)">一键修复类型</el-button>
</template>
</el-table-column>
</KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
@pagination="getListMismatched" />
<!-- 标签预览弹窗 -->
<el-dialog title="标签预览" :visible.sync="labelRender.visible" append-to-body>
@@ -162,7 +164,7 @@
</template>
<script>
import { listTypeErrorCoil, getMaterialCoilTrace, getMaterialCoil, updateMaterialCoilSimple } from "@/api/wms/coil";
import { listTypeErrorCoil, getMaterialCoilTrace, getMaterialCoil, updateMaterialCoilSimple, listMismatchedItemCoil, fixMismatchedItemCoil } from "@/api/wms/coil";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import ProductSelect from "@/components/KLPService/ProductSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
@@ -281,6 +283,7 @@ export default {
{ required: true, message: "毛重不能为空", trigger: "blur" }
],
},
activeTab: 'missing',
};
},
computed: {
@@ -298,9 +301,16 @@ export default {
}
},
created() {
this.getList();
this.handleRefresh();
},
methods: {
handleRefresh() {
if (this.activeTab === 'missing') {
this.getList();
} else if (this.activeTab === 'mismatch') {
this.getListMismatched();
}
},
/** 查询类型不匹配的钢卷列表 */
getList() {
this.loading = true;
@@ -310,6 +320,38 @@ export default {
this.loading = false;
});
},
/** 查询原料材质与钢卷类型不匹配的钢卷列表 */
getListMismatched() {
this.loading = true;
listMismatchedItemCoil(this.queryParams).then(response => {
this.materialCoilList = response.rows || [];
this.total = response.total || 0;
this.loading = false;
});
},
/** 修复原料材质与钢卷类型不匹配的钢卷 */
handleFixType(row) {
this.buttonLoading = true;
this.$confirm('确认一键修复选中钢卷及其相关钢卷的原料材质吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
fixMismatchedItemCoil(row.coilId).then(response => {
if (response.code === 200) {
this.$message.success('修复成功');
this.getListMismatched();
} else {
this.$message.error(response.msg || '修复失败');
}
this.buttonLoading = false;
}).catch(err => {
console.error('修复失败:', err);
this.$message.error('修复失败,请重试');
this.buttonLoading = false;
});
})
},
/** 追溯按钮操作 */
handleTrace(row) {
this.traceOpen = true;
@@ -331,7 +373,7 @@ export default {
handlePreviewLabel(row) {
this.labelRender.visible = true;
const itemName = row.itemName || '';
this.labelRender.type = row.itemType === 'product' ? '3' : '2';
this.labelRender.data = {
...row,