Compare commits
5 Commits
e32739cb09
...
505f821df0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
505f821df0 | ||
|
|
dc92939262 | ||
|
|
ab9ab90ffa | ||
|
|
38f980dbbf | ||
|
|
3d27e14620 |
@@ -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;
|
||||||
|
|||||||
@@ -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: '确定',
|
||||||
|
|||||||
@@ -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" />
|
||||||
@@ -518,18 +522,18 @@ export default {
|
|||||||
if (row.contractContent) {
|
if (row.contractContent) {
|
||||||
// 优化HTML处理,保留p标签作为换行符,将多个p标签单元格合并
|
// 优化HTML处理,保留p标签作为换行符,将多个p标签单元格合并
|
||||||
let htmlContent = row.contractContent;
|
let htmlContent = row.contractContent;
|
||||||
|
|
||||||
// 提取所有p标签内容
|
// 提取所有p标签内容
|
||||||
const pTagRegex = /<p[^>]*>([\s\S]*?)<\/p>/g;
|
const pTagRegex = /<p[^>]*>([\s\S]*?)<\/p>/g;
|
||||||
let match;
|
let match;
|
||||||
const pContents = [];
|
const pContents = [];
|
||||||
|
|
||||||
while ((match = pTagRegex.exec(htmlContent)) !== null) {
|
while ((match = pTagRegex.exec(htmlContent)) !== null) {
|
||||||
let content = match[1];
|
let content = match[1];
|
||||||
|
|
||||||
// 移除其他HTML标签
|
// 移除其他HTML标签
|
||||||
content = content.replace(/<[^>]*>/g, '');
|
content = content.replace(/<[^>]*>/g, '');
|
||||||
|
|
||||||
// 处理HTML实体
|
// 处理HTML实体
|
||||||
content = content.replace(/ /g, ' ');
|
content = content.replace(/ /g, ' ');
|
||||||
content = content.replace(/</g, '<');
|
content = content.replace(/</g, '<');
|
||||||
@@ -537,10 +541,10 @@ export default {
|
|||||||
content = content.replace(/&/g, '&');
|
content = content.replace(/&/g, '&');
|
||||||
content = content.replace(/"/g, '"');
|
content = content.replace(/"/g, '"');
|
||||||
content = content.replace(/'/g, "'");
|
content = content.replace(/'/g, "'");
|
||||||
|
|
||||||
// 清理空格和换行
|
// 清理空格和换行
|
||||||
content = content.trim();
|
content = content.trim();
|
||||||
|
|
||||||
// 如果不是以大写汉字数字开头,添加一个中文字符的缩进
|
// 如果不是以大写汉字数字开头,添加一个中文字符的缩进
|
||||||
if (content) {
|
if (content) {
|
||||||
// 检查是否以大写汉字数字开头(一、二、三、四、五、六、七、八、九、十)
|
// 检查是否以大写汉字数字开头(一、二、三、四、五、六、七、八、九、十)
|
||||||
@@ -551,12 +555,12 @@ export default {
|
|||||||
pContents.push(content);
|
pContents.push(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果没有提取到p标签内容,尝试提取所有文本内容
|
// 如果没有提取到p标签内容,尝试提取所有文本内容
|
||||||
if (pContents.length === 0) {
|
if (pContents.length === 0) {
|
||||||
let textContent = htmlContent.replace(/<[^>]*>/g, '');
|
let textContent = htmlContent.replace(/<[^>]*>/g, '');
|
||||||
textContent = textContent.replace(/ /g, ' ').trim();
|
textContent = textContent.replace(/ /g, ' ').trim();
|
||||||
|
|
||||||
// 如果不是以大写汉字数字开头,添加一个中文字符的缩进
|
// 如果不是以大写汉字数字开头,添加一个中文字符的缩进
|
||||||
if (textContent) {
|
if (textContent) {
|
||||||
// 检查是否以大写汉字数字开头(一、二、三、四、五、六、七、八、九、十)
|
// 检查是否以大写汉字数字开头(一、二、三、四、五、六、七、八、九、十)
|
||||||
@@ -567,28 +571,28 @@ export default {
|
|||||||
pContents.push(textContent);
|
pContents.push(textContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 直接合并单元格并设置内容,避免合并已合并的单元格
|
// 直接合并单元格并设置内容,避免合并已合并的单元格
|
||||||
if (pContents.length > 0) {
|
if (pContents.length > 0) {
|
||||||
// 计算需要的行数
|
// 计算需要的行数
|
||||||
const contentLines = pContents.reduce((total, content) => {
|
const contentLines = pContents.reduce((total, content) => {
|
||||||
return total + (content.match(/\n/g) || []).length + 1;
|
return total + (content.match(/\n/g) || []).length + 1;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
// 合并单元格
|
// 合并单元格
|
||||||
const endRow = currentRow + Math.ceil(contentLines / 2); // 估算需要的行数
|
const endRow = currentRow + Math.ceil(contentLines / 2); // 估算需要的行数
|
||||||
worksheet.mergeCells(`A${currentRow}:H${endRow}`);
|
worksheet.mergeCells(`A${currentRow}:H${endRow}`);
|
||||||
|
|
||||||
// 设置合并后单元格的内容和样式
|
// 设置合并后单元格的内容和样式
|
||||||
const mergedContent = pContents.join('\n');
|
const mergedContent = pContents.join('\n');
|
||||||
worksheet.getCell(`A${currentRow}`).value = mergedContent;
|
worksheet.getCell(`A${currentRow}`).value = mergedContent;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'top', wrapText: true };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'top', wrapText: true };
|
||||||
|
|
||||||
// 调整合并后单元格的行高
|
// 调整合并后单元格的行高
|
||||||
const lineCount = (mergedContent.match(/\n/g) || []).length + 1;
|
const lineCount = (mergedContent.match(/\n/g) || []).length + 1;
|
||||||
const height = Math.max(60, lineCount * 15);
|
const height = Math.max(60, lineCount * 15);
|
||||||
worksheet.getRow(currentRow).height = height;
|
worksheet.getRow(currentRow).height = height;
|
||||||
|
|
||||||
// 调整currentRow
|
// 调整currentRow
|
||||||
currentRow = endRow + 1;
|
currentRow = endRow + 1;
|
||||||
}
|
}
|
||||||
@@ -602,62 +606,62 @@ export default {
|
|||||||
if (currentRow > 0) {
|
if (currentRow > 0) {
|
||||||
// 空行
|
// 空行
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
// 供方(甲方)信息
|
// 供方(甲方)信息
|
||||||
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
||||||
worksheet.getCell(`A${currentRow}`).value = `供方(甲方):${row.supplier || '嘉祥科伦普重工有限公司'}`;
|
worksheet.getCell(`A${currentRow}`).value = `供方(甲方):${row.supplier || '嘉祥科伦普重工有限公司'}`;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|
||||||
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
||||||
worksheet.getCell(`E${currentRow}`).value = `需方(乙方):${row.customer || ''}`;
|
worksheet.getCell(`E${currentRow}`).value = `需方(乙方):${row.customer || ''}`;
|
||||||
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
// 地址信息
|
// 地址信息
|
||||||
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
||||||
worksheet.getCell(`A${currentRow}`).value = `地址:${row.supplierAddress || ''}`;
|
worksheet.getCell(`A${currentRow}`).value = `地址:${row.supplierAddress || ''}`;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|
||||||
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
||||||
worksheet.getCell(`E${currentRow}`).value = `地址:${row.customerAddress || ''}`;
|
worksheet.getCell(`E${currentRow}`).value = `地址:${row.customerAddress || ''}`;
|
||||||
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
// 电话信息
|
// 电话信息
|
||||||
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
||||||
worksheet.getCell(`A${currentRow}`).value = `电话:${row.supplierPhone || ''}`;
|
worksheet.getCell(`A${currentRow}`).value = `电话:${row.supplierPhone || ''}`;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|
||||||
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
||||||
worksheet.getCell(`E${currentRow}`).value = `电话:${row.customerPhone || ''}`;
|
worksheet.getCell(`E${currentRow}`).value = `电话:${row.customerPhone || ''}`;
|
||||||
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
// 开户行信息
|
// 开户行信息
|
||||||
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
||||||
worksheet.getCell(`A${currentRow}`).value = `开户行:${row.supplierBank || ''}`;
|
worksheet.getCell(`A${currentRow}`).value = `开户行:${row.supplierBank || ''}`;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|
||||||
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
||||||
worksheet.getCell(`E${currentRow}`).value = `开户行:${row.customerBank || ''}`;
|
worksheet.getCell(`E${currentRow}`).value = `开户行:${row.customerBank || ''}`;
|
||||||
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
// 账号信息
|
// 账号信息
|
||||||
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
||||||
worksheet.getCell(`A${currentRow}`).value = `账号:${row.supplierAccount || ''}`;
|
worksheet.getCell(`A${currentRow}`).value = `账号:${row.supplierAccount || ''}`;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|
||||||
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
||||||
worksheet.getCell(`E${currentRow}`).value = `账号:${row.customerAccount || ''}`;
|
worksheet.getCell(`E${currentRow}`).value = `账号:${row.customerAccount || ''}`;
|
||||||
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
currentRow++;
|
currentRow++;
|
||||||
|
|
||||||
// 税号信息
|
// 税号信息
|
||||||
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
worksheet.mergeCells(`A${currentRow}:D${currentRow}`);
|
||||||
worksheet.getCell(`A${currentRow}`).value = `税号:${row.supplierTaxNo || ''}`;
|
worksheet.getCell(`A${currentRow}`).value = `税号:${row.supplierTaxNo || ''}`;
|
||||||
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`A${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|
||||||
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
worksheet.mergeCells(`E${currentRow}:H${currentRow}`);
|
||||||
worksheet.getCell(`E${currentRow}`).value = `税号:${row.customerTaxNo || ''}`;
|
worksheet.getCell(`E${currentRow}`).value = `税号:${row.customerTaxNo || ''}`;
|
||||||
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
worksheet.getCell(`E${currentRow}`).alignment = { horizontal: 'left', vertical: 'middle' };
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -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"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<CoilList :coilList="coilList" @click="handleCoilClick" />
|
<CoilList :coilList="coilList" @click="handleCoilClick" />
|
||||||
</div>
|
</div>
|
||||||
<pagination v-show="coilTotal > 0" :total="coilTotal" :page.sync="coilQuery.pageNum"
|
<pagination v-show="coilTotal > 0" :total="coilTotal" :page.sync="coilQuery.pageNum"
|
||||||
:limit.sync="coilQuery.pageSize" @pagination="getCoilList" />
|
:limit.sync="coilQuery.pageSize" @pagination="getCoilList" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 左侧为有异常的钢卷列表 -->
|
<!-- 左侧为有异常的钢卷列表 -->
|
||||||
<!-- <el-table :data="coilList" border stripe @row-click="handleCoilClick">
|
<!-- <el-table :data="coilList" border stripe @row-click="handleCoilClick">
|
||||||
@@ -46,25 +46,19 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddWithCoil">新增</el-button>
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddWithCoil">新增</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<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>
|
||||||
</template>
|
<el-tag v-else type="danger">否</el-tag>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column label="判级人" align="center" prop="judgeBy" />
|
</el-table-column>
|
||||||
<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();
|
||||||
|
|||||||
@@ -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" />
|
||||||
@@ -167,8 +176,8 @@ export default {
|
|||||||
'$route.query.coilId': {
|
'$route.query.coilId': {
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
// if (newVal !== oldVal) {
|
// if (newVal !== oldVal) {
|
||||||
this.queryParams.coilId = newVal
|
this.queryParams.coilId = newVal
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
@@ -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();
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
<abnormal-form ref="abnormalForm" v-model="form" :show-coil-selector="false"></abnormal-form>
|
<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>
|
||||||
|
</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();
|
||||||
|
|||||||
@@ -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>
|
||||||
<coil-selector v-loading="buttonLoading" ref="coilSelector" multiple @confirm="handleCoilChange"></coil-selector>
|
<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>
|
||||||
|
</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);
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user