Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

This commit is contained in:
2026-03-16 15:58:19 +08:00
10 changed files with 282 additions and 131 deletions

View File

@@ -116,8 +116,8 @@ export function splitMaterialCoil(data) {
// 钢卷合卷 // 钢卷合卷
export function mergeMaterialCoil(data) { export function mergeMaterialCoil(data) {
return request({ return request({
url: '/wms/materialCoil', url: '/wms/materialCoil/merge',
method: 'put', method: 'post',
data: data data: data
}) })
} }

View File

@@ -1,6 +1,6 @@
<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="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="60px">
<el-form-item label="炉编号" prop="furnaceCode"> <el-form-item label="炉编号" prop="furnaceCode">
<el-input v-model="queryParams.furnaceCode" placeholder="请输入炉编号" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.furnaceCode" placeholder="请输入炉编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
@@ -38,36 +38,44 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<KLPTable v-loading="loading" :data="furnaceList" @selection-change="handleSelectionChange"> <div class="furnace-container">
<el-table-column type="selection" width="55" align="center" /> <div v-for="item in furnaceList" :key="item.furnaceId" class="furnace-card">
<el-table-column label="炉编号" align="center" prop="furnaceCode" /> <div class="furnace-header">
<el-table-column label="名称" align="center" prop="furnaceName" /> <svg-icon icon-class="furnace" :class="item.busyFlag === 1 ? 'furnace-busy' : 'furnace-idle'" />
<el-table-column label="状态" align="center" prop="status"> <div>
<template slot-scope="scope"> <div class="furnace-name">{{ item.furnaceName }}</div>
<el-tag v-if="scope.row.status === 1" type="success">启用</el-tag> <div class="furnace-code">{{ item.furnaceCode }}</div>
<el-tag v-else type="info">停用</el-tag> </div>
</template> </div>
</el-table-column> <div class="furnace-body">
<el-table-column label="忙碌" align="center" prop="busyFlag"> <div class="furnace-line">状态<span :class="item.status === 1 ? 'active-text' : 'inactive-text'">{{ item.status === 1 ? '启用' : '停用' }}</span></div>
<template slot-scope="scope"> <div class="furnace-line">忙碌<span :class="item.busyFlag === 1 ? 'busy-text' : 'idle-text'">{{ item.busyFlag === 1 ? '忙碌' : '空闲' }}</span></div>
<el-tag v-if="scope.row.busyFlag === 1" type="warning">忙碌</el-tag> <!-- <div v-if="item.busyFlag === 1" class="furnace-line">
<el-tag v-else type="success">空闲</el-tag> 计划{{ item.currentPlanNo || '-' }}
</template> </div>
</el-table-column> <div v-if="item.busyFlag === 1" class="furnace-line">
<el-table-column label="备注" align="center" prop="remark" /> 当前钢卷{{ item.coilCount || 0 }}
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> </div>
<template slot-scope="scope"> <div v-if="item.busyFlag === 1" class="furnace-line">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> 预计剩余{{ formatCountdown(item.planEndTime) }}
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> </div> -->
<el-button size="mini" type="text" icon="el-icon-setting" @click="handleToggleStatus(scope.row)"> <!-- <div v-else class="furnace-line">待入炉计划{{ planQueueCount(item.furnaceId) }}</div> -->
{{ scope.row.status === 1 ? '停用' : '启用' }} <div class="furnace-line">
</el-button> 备注{{ item.remark }}
<el-button size="mini" type="text" icon="el-icon-time" @click="handleToggleBusy(scope.row)"> </div>
{{ scope.row.busyFlag === 1 ? '置闲' : '置忙' }} <div class="furnace-actions">
</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)">修改</el-button>
</template> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(item)">删除</el-button>
</el-table-column> <!-- <el-button size="mini" type="text" icon="el-icon-setting" @click="handleToggleStatus(item)">
</KLPTable> {{ item.status === 1 ? '停用' : '启用' }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-time" @click="handleToggleBusy(item)">
{{ item.busyFlag === 1 ? '置闲' : '置忙' }}
</el-button> -->
</div>
</div>
</div>
</div>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
@@ -105,6 +113,7 @@
<script> <script>
import { listAnnealFurnace, getAnnealFurnace, addAnnealFurnace, updateAnnealFurnace, delAnnealFurnace, changeAnnealFurnaceStatus, changeAnnealFurnaceBusy } from "@/api/wms/annealFurnace"; import { listAnnealFurnace, getAnnealFurnace, addAnnealFurnace, updateAnnealFurnace, delAnnealFurnace, changeAnnealFurnaceStatus, changeAnnealFurnaceBusy } from "@/api/wms/annealFurnace";
import { listAnnealPlan } from "@/api/wms/annealPlan";
export default { export default {
name: "AnnealFurnace", name: "AnnealFurnace",
@@ -118,6 +127,7 @@ export default {
showSearch: true, showSearch: true,
total: 0, total: 0,
furnaceList: [], furnaceList: [],
planQueue: [],
title: "", title: "",
open: false, open: false,
queryParams: { queryParams: {
@@ -141,12 +151,36 @@ export default {
methods: { methods: {
getList() { getList() {
this.loading = true; this.loading = true;
listAnnealFurnace(this.queryParams).then(response => { Promise.all([
this.furnaceList = response.rows; listAnnealFurnace(this.queryParams),
this.total = response.total; listAnnealPlan({ pageNum: 1, pageSize: 100 })
]).then(([furnaceResponse, planResponse]) => {
this.furnaceList = furnaceResponse.rows;
this.total = furnaceResponse.total;
this.planQueue = planResponse.rows || [];
this.loading = false;
}).catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
planQueueCount(furnaceId) {
if (!this.planQueue) {
return 0;
}
return this.planQueue.filter(item => item.targetFurnaceId === furnaceId && item.status === 0).length;
},
formatCountdown(endTime) {
if (!endTime) return '-';
const end = new Date(endTime).getTime();
const now = Date.now();
let diff = Math.max(0, end - now);
const hours = Math.floor(diff / (1000 * 60 * 60));
diff %= 1000 * 60 * 60;
const minutes = Math.floor(diff / (1000 * 60));
diff %= 1000 * 60;
const seconds = Math.floor(diff / 1000);
return `${hours}小时${minutes}${seconds}`;
},
cancel() { cancel() {
this.open = false; this.open = false;
this.reset(); this.reset();
@@ -265,3 +299,66 @@ export default {
} }
}; };
</script> </script>
<style scoped>
.furnace-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 12px;
margin-bottom: 16px;
}
.furnace-card {
border: 1px solid #f0f2f5;
border-radius: 8px;
padding: 12px;
background: #ffffff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.furnace-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.furnace-name {
font-weight: 600;
color: #303133;
}
.furnace-code {
font-size: 12px;
color: #909399;
}
.furnace-body {
font-size: 13px;
color: #606266;
}
.furnace-line {
margin-bottom: 4px;
}
.furnace-actions {
margin-top: 12px;
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.furnace-idle {
font-size: 28px;
color: #303133;
}
.furnace-busy {
font-size: 28px;
color: #f56c6c;
}
.busy-text {
color: #f56c6c;
}
.idle-text {
color: #67c23a;
}
.active-text {
color: #67c23a;
}
.inactive-text {
color: #909399;
}
</style>

View File

@@ -6,7 +6,8 @@
</el-form-item> </el-form-item>
<el-form-item label="目标炉" prop="targetFurnaceId"> <el-form-item label="目标炉" prop="targetFurnaceId">
<el-select v-model="queryParams.targetFurnaceId" placeholder="请选择" clearable filterable> <el-select v-model="queryParams.targetFurnaceId" placeholder="请选择" clearable filterable>
<el-option v-for="item in furnaceOptions" :key="item.furnaceId" :label="item.furnaceName" :value="item.furnaceId" /> <el-option v-for="item in furnaceOptions" :key="item.furnaceId" :label="item.furnaceName"
:value="item.furnaceId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
@@ -27,15 +28,18 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate">修改</el-button> <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
@click="handleUpdate">修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除</el-button> <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
@click="handleDelete">删除</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<KLPTable v-loading="loading" :data="planList" @selection-change="handleSelectionChange" @row-click="handleRowClick"> <KLPTable v-loading="loading" :data="planList" @selection-change="handleSelectionChange"
@row-click="handleRowClick">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="计划号" align="center" prop="planNo" /> <el-table-column label="计划号" align="center" prop="planNo" />
<el-table-column label="计划时间" align="center" prop="planStartTime" width="160"> <el-table-column label="计划时间" align="center" prop="planStartTime" width="160">
@@ -63,14 +67,18 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)">修改</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(scope.row)">删除</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(scope.row)">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-s-operation" @click.stop="openStatusDialog(scope.row)">状态</el-button> <el-button size="mini" type="text" icon="el-icon-s-operation"
<el-button v-if="scope.row.status === 0" size="mini" type="text" icon="el-icon-s-flag" :disabled="!scope.row.coilCount" @click.stop="handleInFurnace(scope.row)">入炉</el-button> @click.stop="openStatusDialog(scope.row)">状态</el-button>
<el-button v-if="scope.row.status === 2" size="mini" type="text" icon="el-icon-check" @click.stop="handleComplete(scope.row)">完成</el-button> <el-button v-if="scope.row.status === 0" size="mini" type="text" icon="el-icon-s-flag"
:disabled="!scope.row.coilCount" @click.stop="handleInFurnace(scope.row)">入炉</el-button>
<el-button v-if="scope.row.status === 2" size="mini" type="text" icon="el-icon-check"
@click.stop="handleComplete(scope.row)">完成</el-button>
</template> </template>
</el-table-column> </el-table-column>
</KLPTable> </KLPTable>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<el-row :gutter="20" class="mt16"> <el-row :gutter="20" class="mt16">
<el-col :span="12"> <el-col :span="12">
@@ -81,10 +89,12 @@
</div> </div>
<el-form :model="materialQueryParams" ref="materialQueryForm" size="small" :inline="true" class="mb8"> <el-form :model="materialQueryParams" ref="materialQueryForm" size="small" :inline="true" class="mb8">
<el-form-item label="入场钢卷号" prop="enterCoilNo"> <el-form-item label="入场钢卷号" prop="enterCoilNo">
<el-input v-model="materialQueryParams.enterCoilNo" placeholder="请输入入场钢卷号" clearable style="width: 160px" /> <el-input v-model="materialQueryParams.enterCoilNo" placeholder="请输入入场钢卷号" clearable
style="width: 160px" />
</el-form-item> </el-form-item>
<el-form-item label="当前钢卷号" prop="currentCoilNo"> <el-form-item label="当前钢卷号" prop="currentCoilNo">
<el-input v-model="materialQueryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable style="width: 160px" /> <el-input v-model="materialQueryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
style="width: 160px" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterialQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterialQuery">搜索</el-button>
@@ -97,11 +107,12 @@
</div> </div>
<div v-for="item in materialList" :key="item.coilId" class="material-card"> <div v-for="item in materialList" :key="item.coilId" class="material-card">
<div class="material-header"> <div class="material-header">
<div> <div class="material-text-wrap">
<div class="material-title">{{ item.currentCoilNo || '-' }}</div> <div class="material-title">{{ item.currentCoilNo || '-' }}</div>
<div class="material-sub">入场{{ item.enterCoilNo || '-' }}</div> <div class="material-sub">入场{{ item.enterCoilNo || '-' }}</div>
</div> </div>
<el-button type="primary" size="mini" @click="handleAddToPlan(item)" :disabled="!currentPlan.planId || currentPlan.status !== 0">加入计划</el-button> <el-button type="primary" size="mini" @click="handleAddToPlan(item)"
:disabled="!currentPlan.planId || currentPlan.status !== 0">加入计划</el-button>
</div> </div>
<div class="material-body"> <div class="material-body">
<div class="material-row">厂家{{ item.supplierCoilNo || '-' }}</div> <div class="material-row">厂家{{ item.supplierCoilNo || '-' }}</div>
@@ -119,9 +130,13 @@
<div slot="header" class="panel-header"> <div slot="header" class="panel-header">
<span>退火计划</span> <span>退火计划</span>
<div> <div>
<el-button size="mini" icon="el-icon-refresh" @click="loadPlanCoils" :disabled="!currentPlan.planId">刷新</el-button> <el-button size="mini" icon="el-icon-refresh" @click="loadPlanCoils"
<el-button size="mini" type="primary" icon="el-icon-s-flag" :disabled="!currentPlan.planId || currentPlan.status !== 0 || !currentPlan.coilCount" @click="handleInFurnace(currentPlan)">入炉</el-button> :disabled="!currentPlan.planId">刷新</el-button>
<el-button size="mini" type="success" icon="el-icon-check" :disabled="!currentPlan.planId || currentPlan.status !== 2" @click="openCompleteDialog">完成退火</el-button> <el-button size="mini" type="primary" icon="el-icon-s-flag"
:disabled="!currentPlan.planId || currentPlan.status !== 0 || !currentPlan.coilCount"
@click="handleInFurnace(currentPlan)">入炉</el-button>
<el-button size="mini" type="success" icon="el-icon-check"
:disabled="!currentPlan.planId || currentPlan.status !== 2" @click="openCompleteDialog">完成退火</el-button>
</div> </div>
</div> </div>
<div v-if="!currentPlan.planId" class="empty-tip"> <div v-if="!currentPlan.planId" class="empty-tip">
@@ -133,7 +148,8 @@
<div>目标炉{{ currentPlan.targetFurnaceName || '-' }}</div> <div>目标炉{{ currentPlan.targetFurnaceName || '-' }}</div>
<div>状态{{ statusLabel(currentPlan.status) }}</div> <div>状态{{ statusLabel(currentPlan.status) }}</div>
<div> <div>
<el-button size="mini" type="primary" icon="el-icon-s-flag" :disabled="currentPlan.status !== 0" @click="handleInFurnace(currentPlan)">入炉</el-button> <el-button size="mini" type="primary" icon="el-icon-s-flag" :disabled="currentPlan.status !== 0"
@click="handleInFurnace(currentPlan)">入炉</el-button>
</div> </div>
</div> </div>
<el-table :data="coilList" v-loading="coilLoading" class="light-table"> <el-table :data="coilList" v-loading="coilLoading" class="light-table">
@@ -183,11 +199,13 @@
<el-input v-model="form.planNo" placeholder="请输入计划号" /> <el-input v-model="form.planNo" placeholder="请输入计划号" />
</el-form-item> </el-form-item>
<el-form-item label="计划开始" prop="planStartTime"> <el-form-item label="计划开始" prop="planStartTime">
<el-date-picker clearable v-model="form.planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择计划时间" /> <el-date-picker clearable v-model="form.planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择计划时间" />
</el-form-item> </el-form-item>
<el-form-item label="目标炉" prop="targetFurnaceId"> <el-form-item label="目标炉" prop="targetFurnaceId">
<el-select v-model="form.targetFurnaceId" placeholder="请选择" filterable> <el-select v-model="form.targetFurnaceId" placeholder="请选择" filterable>
<el-option v-for="item in furnaceOptions" :key="item.furnaceId" :label="item.furnaceName" :value="item.furnaceId" /> <el-option v-for="item in furnaceOptions" :key="item.furnaceId" :label="item.furnaceName"
:value="item.furnaceId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
@@ -578,39 +596,43 @@ export default {
.mt16 { .mt16 {
margin-top: 16px; margin-top: 16px;
} }
.empty-tip { .empty-tip {
margin-top: 10px; margin-top: 10px;
} }
.panel-card { .panel-card {
border: 1px solid #f0f2f5; border: 1px solid #f0f2f5;
background: #ffffff; background: #ffffff;
} }
.panel-header { .panel-header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
/* ========== 修复在这里 ========== */
.material-grid { .material-grid {
display: grid; display: grid;
grid-template-columns: repeat(4, minmax(220px, 1fr)); /* 核心修复:去掉固定 4 列,改用自动填充,实现真正自适应 */
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 12px; gap: 12px;
min-height: 120px; min-height: 120px;
/* 必须加,让 grid 不受父级弹性压缩影响 */
width: 100%;
box-sizing: border-box;
} }
@media (max-width: 1400px) {
.material-grid { /* 媒体查询只需要控制最小宽度即可,不用写死列数 */
grid-template-columns: repeat(3, minmax(220px, 1fr));
}
}
@media (max-width: 1100px) {
.material-grid {
grid-template-columns: repeat(2, minmax(220px, 1fr));
}
}
@media (max-width: 768px) { @media (max-width: 768px) {
.material-grid { .material-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
} }
/* =============================== */
.material-card { .material-card {
border: 1px solid #e9ecf2; border: 1px solid #e9ecf2;
border-radius: 8px; border-radius: 8px;
@@ -618,32 +640,59 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
} }
.material-header { .material-header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 8px; gap: 8px;
margin-bottom: 8px; margin-bottom: 8px;
/* 新增:让文字区域和按钮分行适配小宽度 */
flex-wrap: wrap;
} }
/* 新增:文字容器,限制宽度并溢出省略 */
.material-text-wrap {
flex: 1;
min-width: 0;
/* 关键让flex子元素遵守宽度限制 */
}
.material-title { .material-title {
font-weight: 600; font-weight: 600;
color: #303133; color: #303133;
/* 新增:标题溢出省略 */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 180px;
/* 可根据需要调整最大宽度 */
} }
.material-sub { .material-sub {
font-size: 12px; font-size: 12px;
color: #909399; color: #909399;
/* 核心:入场钢卷号溢出省略 */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 180px;
/* 限制最大长度,避免挤压按钮 */
} }
.material-body { .material-body {
font-size: 12px; font-size: 12px;
color: #606266; color: #606266;
display: grid; display: grid;
gap: 4px; gap: 4px;
} }
.material-row { .material-row {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.plan-summary { .plan-summary {
display: grid; display: grid;
grid-template-columns: repeat(3, minmax(120px, 1fr)); grid-template-columns: repeat(3, minmax(120px, 1fr));
@@ -652,14 +701,17 @@ export default {
color: #606266; color: #606266;
margin-bottom: 8px; margin-bottom: 8px;
} }
:deep(.el-card__header) { :deep(.el-card__header) {
border-bottom: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
background: #ffffff; background: #ffffff;
} }
:deep(.el-table th), :deep(.el-table th),
:deep(.el-table td) { :deep(.el-table td) {
border-bottom: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
} }
:deep(.el-table::before) { :deep(.el-table::before) {
background-color: transparent; background-color: transparent;
} }

View File

@@ -758,7 +758,6 @@ export default {
this.labelRender.type = type; this.labelRender.type = type;
this.labelRender.data = { this.labelRender.data = {
...row, ...row,
itemName: itemName,
updateTime: row.updateTime?.split(' ')[0] || '', updateTime: row.updateTime?.split(' ')[0] || '',
}; };
}, },

View File

@@ -655,6 +655,8 @@ export default {
enterCoilNo: item.enterCoilNo, enterCoilNo: item.enterCoilNo,
currentCoilNo: item.currentCoilNo, currentCoilNo: item.currentCoilNo,
materialType: item.materialType, materialType: item.materialType,
actionId: item.actionId, // 保存待操作ID用于后续完成操作
actionType: this.actionTypeCode, // 合卷操作类型
})) }))
}; };
@@ -663,7 +665,7 @@ export default {
text: '正在合卷,请稍后...', text: '正在合卷,请稍后...',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}); });
this.completeAllRelatedActions(); // this.completeAllRelatedActions();
await mergeMaterialCoil(mergeData); await mergeMaterialCoil(mergeData);
this.$message.success('合卷保存成功'); this.$message.success('合卷保存成功');

View File

@@ -814,9 +814,9 @@ export default {
handlePrintLabel(row) { handlePrintLabel(row) {
const type = getCoilTagPrintType(row); const type = getCoilTagPrintType(row);
this.labelRender.type = type; this.labelRender.type = type;
this.labelRender.data = { this.labelRender.data = {
...row, ...row,
itemName: itemName,
updateTime: row.updateTime?.split(' ')[0] || '', updateTime: row.updateTime?.split(' ')[0] || '',
}; };
this.$nextTick(() => { this.$nextTick(() => {

View File

@@ -720,7 +720,6 @@ export default {
this.labelRender.type = type; this.labelRender.type = type;
this.labelRender.data = { this.labelRender.data = {
...row, ...row,
itemName: itemName,
updateTime: row.updateTime?.split(' ')[0] || '', updateTime: row.updateTime?.split(' ')[0] || '',
}; };
this.$nextTick(() => { this.$nextTick(() => {

View File

@@ -440,7 +440,7 @@ export default {
// 固定按纸张尺寸截图:右侧留白来自于 contentEl 的缩放241 -> 211mm而不是扩大截图宽度 // 固定按纸张尺寸截图:右侧留白来自于 contentEl 的缩放241 -> 211mm而不是扩大截图宽度
const canvas = await html2canvas(node, { const canvas = await html2canvas(node, {
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
scale: 3, scale: 6,
useCORS: true, useCORS: true,
willReadFrequently: true, willReadFrequently: true,
width: pageWidthPx, width: pageWidthPx,

View File

@@ -440,7 +440,7 @@ export default {
// 固定按纸张尺寸截图:右侧留白来自于 contentEl 的缩放241 -> 211mm而不是扩大截图宽度 // 固定按纸张尺寸截图:右侧留白来自于 contentEl 的缩放241 -> 211mm而不是扩大截图宽度
const canvas = await html2canvas(node, { const canvas = await html2canvas(node, {
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
scale: 3, scale: 6,
useCORS: true, useCORS: true,
willReadFrequently: true, willReadFrequently: true,
width: pageWidthPx, width: pageWidthPx,

View File

@@ -2,16 +2,16 @@
<div class="app-container"> <div class="app-container">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="5"> <el-col :span="5">
<PlanList ref="planList" @select="handlePlanSelect"/> <PlanList ref="planList" @select="handlePlanSelect" />
</el-col> </el-col>
<el-col :span="19" style="height: calc(100vh - 124px); overflow-y: scroll;"> <el-col :span="19" style="position: relative;">
<el-card v-if="!selectedPlan"> <el-card v-if="!selectedPlan">
<el-empty description="请先选择发货计划" /> <el-empty description="请先选择发货计划" />
</el-card> </el-card>
<el-card v-else> <el-card v-else>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" <el-form style="position: sticky; left: 0; top: 0;" :model="queryParams" ref="queryForm" size="small"
label-width="68px"> :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="发货单名称" prop="waybillName"> <el-form-item label="发货单名称" prop="waybillName">
<el-input v-model="queryParams.waybillName" placeholder="请输入发货单名称" clearable <el-input v-model="queryParams.waybillName" placeholder="请输入发货单名称" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
@@ -35,62 +35,64 @@
</el-descriptions> </el-descriptions>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="height: calc(100vh - 184px); overflow-y: scroll; overflow-x: hidden;">
<el-table v-loading="loading" border :data="deliveryWaybillList" highlight-current-row
@row-click="handleRowClick">
<el-table-column label="发货单唯一ID" align="center" prop="waybillId" v-if="false" />
<el-table-column label="发货单名称" align="center" prop="waybillName" />
<el-table-column label="车牌" align="center" prop="licensePlate" width="100" />
<el-table-column label="收货单位" align="center" prop="consigneeUnit" />
<!-- <el-table-column label="发货单位" align="center" prop="senderUnit" /> -->
<el-table-column label="订单编号" align="center" prop="orderNo">
<template slot-scope="scope">
<span v-if="scope.row.orderId">{{ scope.row.orderCode }}</span>
<span v-else>{{ scope.row.principalPhone }}</span>
</template>
</el-table-column>
<el-table-column label="发货时间" align="center" prop="deliveryTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.deliveryTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="负责人" align="center" prop="principal" width="60" />
<el-table-column label="备注" align="center" prop="remark" width="100" show-overflow-tooltip />
<el-table v-loading="loading" border :data="deliveryWaybillList" highlight-current-row <!-- <el-table-column label="负责人电话" align="center" prop="principalPhone" width="100" /> -->
@row-click="handleRowClick"> <el-table-column label="完成状态" align="center" prop="status" width="120">
<el-table-column label="发货单唯一ID" align="center" prop="waybillId" v-if="false" /> <template slot-scope="scope">
<el-table-column label="发货单名称" align="center" prop="waybillName" /> <el-select v-model="scope.row.status" placeholder="请选择完成状态" @change="handleStatusChange(scope.row)">
<el-table-column label="车牌" align="center" prop="licensePlate" width="100" /> <el-option label="已发货" :value="1" />
<el-table-column label="收货单位" align="center" prop="consigneeUnit" /> <el-option label="未发货" :value="0" />
<!-- <el-table-column label="发货单位" align="center" prop="senderUnit" /> --> <el-option label="已打印" :value="2" />
<el-table-column label="订单编号" align="center" prop="orderNo"> <el-option label="未打印" :value="3" />
<template slot-scope="scope"> </el-select>
<span v-if="scope.row.orderId">{{ scope.row.orderCode }}</span> </template>
<span v-else>{{ scope.row.principalPhone }}</span> </el-table-column>
</template> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
</el-table-column> <template slot-scope="scope">
<el-table-column label="发货时间" align="center" prop="deliveryTime" width="100"> <el-button size="mini" type="text" icon="el-icon-view"
<template slot-scope="scope"> @click.stop="handlePrint(scope.row)">打印发货单</el-button>
<span>{{ parseTime(scope.row.deliveryTime, '{y}-{m}-{d}') }}</span> <el-button size="mini" type="text" icon="el-icon-view"
</template> @click.stop="handlePrintSimple(scope.row)">简单打印</el-button>
</el-table-column> <el-button size="mini" type="text" icon="el-icon-copy"
<el-table-column label="负责人" align="center" prop="principal" width="60" /> @click.stop="handleCopy(scope.row)">复制新增</el-button>
<el-table-column label="备注" align="center" prop="remark" width="100" show-overflow-tooltip/> <el-button size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status === 1"
title="已发货的发货单不能修改" @click.stop="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" :disabled="scope.row.status === 1"
title="已发货的发货单不能删除" @click.stop="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- <el-table-column label="负责人电话" align="center" prop="principalPhone" width="100" /> --> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
<el-table-column label="完成状态" align="center" prop="status" width="120"> :limit.sync="queryParams.pageSize" @pagination="getList" />
<template slot-scope="scope">
<el-select v-model="scope.row.status" placeholder="请选择完成状态" @change="handleStatusChange(scope.row)">
<el-option label="已发货" :value="1" />
<el-option label="未发货" :value="0" />
<el-option label="已打印" :value="2" />
<el-option label="未打印" :value="3" />
</el-select>
</template>
</el-table-column>
<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-view"
@click.stop="handlePrint(scope.row)">打印发货单</el-button>
<el-button size="mini" type="text" icon="el-icon-view"
@click.stop="handlePrintSimple(scope.row)">简单打印</el-button>
<el-button size="mini" type="text" icon="el-icon-copy"
@click.stop="handleCopy(scope.row)">复制新增</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status === 1"
title="已发货的发货单不能修改" @click.stop="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" :disabled="scope.row.status === 1"
title="已发货的发货单不能删除" @click.stop="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <el-divider style="margin: 20px 0;" />
:limit.sync="queryParams.pageSize" @pagination="getList" />
<el-divider style="margin: 20px 0;" /> <DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList" />
<el-empty v-else description="已发货,不可修改,点击打印查看详情" />
</div>
<DeliveryWaybillDetail v-if="canEdit" ref="detailTable" :waybillId="waybillId" :coilList="coilList" />
<el-empty v-else description="已发货,不可修改,点击打印查看详情" />
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@@ -119,10 +121,10 @@
<el-input v-model="form.principal" placeholder="请输入负责人" /> <el-input v-model="form.principal" placeholder="请输入负责人" />
</el-form-item> </el-form-item>
<el-form-item label="订单编号" prop="principalPhone" v-if="!form.orderId"> <el-form-item label="订单编号" prop="principalPhone" v-if="!form.orderId">
<el-input v-model="form.principalPhone" placeholder="请输入订单编号"/> <el-input v-model="form.principalPhone" placeholder="请输入订单编号" />
</el-form-item> </el-form-item>
<el-form-item label="订单编号" prop="principalPhone" v-else title="当前发货单已绑定订单"> <el-form-item label="订单编号" prop="principalPhone" v-else title="当前发货单已绑定订单">
<el-input v-model="form.orderCode" placeholder="请输入订单编号" readonly disabled/> <el-input v-model="form.orderCode" placeholder="请输入订单编号" readonly disabled />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
@@ -405,7 +407,7 @@ export default {
}); });
}, },
handleCopy(row) { handleCopy(row) {
this.form = { this.form = {
waybillNo: new Date().getTime(), waybillNo: new Date().getTime(),
waybillName: row.waybillName, waybillName: row.waybillName,
planId: row.planId, planId: row.planId,
@@ -485,7 +487,7 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 打印发货单 */ /** 打印发货单 */
handlePrintSimple(row) { handlePrintSimple(row) {
this.loading = true; this.loading = true;
this.printType = 1; this.printType = 1;