feat: 多页面功能优化与新增
This commit is contained in:
@@ -17,13 +17,22 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成本分类 原料/能耗/辅料/设备/人工" prop="category">
|
<el-form-item label="成本分类" prop="category">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="queryParams.category"
|
v-model="queryParams.category"
|
||||||
placeholder="请输入成本分类 原料/能耗/辅料/设备/人工"
|
placeholder="请选择成本分类"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@change="handleQuery"
|
||||||
/>
|
>
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
<el-option label="能耗" value="能耗" />
|
||||||
|
<el-option label="辅料" value="辅料" />
|
||||||
|
<el-option label="设备" value="设备" />
|
||||||
|
<el-option label="人工" value="人工" />
|
||||||
|
<el-option label="产出" value="产出" />
|
||||||
|
<el-option label="轧辊" value="轧辊" />
|
||||||
|
<el-option label="其他" value="其他" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计量单位" prop="unit">
|
<el-form-item label="计量单位" prop="unit">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -33,6 +42,14 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="查询条件" prop="queryCondition">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.queryCondition"
|
||||||
|
placeholder="请输入查询条件"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<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>
|
||||||
@@ -86,9 +103,10 @@
|
|||||||
<el-table-column label="主键ID" align="center" prop="itemId" v-if="true"/>
|
<el-table-column label="主键ID" align="center" prop="itemId" v-if="true"/>
|
||||||
<el-table-column label="成本项目编码" align="center" prop="itemCode" />
|
<el-table-column label="成本项目编码" align="center" prop="itemCode" />
|
||||||
<el-table-column label="成本项目名称" align="center" prop="itemName" />
|
<el-table-column label="成本项目名称" align="center" prop="itemName" />
|
||||||
<el-table-column label="成本分类 原料/能耗/辅料/设备/人工" align="center" prop="category" />
|
<el-table-column label="成本分类" align="center" prop="category" />
|
||||||
<el-table-column label="计量单位" align="center" prop="unit" />
|
<el-table-column label="计量单位" align="center" prop="unit" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="查询条件" align="center" prop="queryCondition" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -124,8 +142,17 @@
|
|||||||
<el-form-item label="成本项目名称" prop="itemName">
|
<el-form-item label="成本项目名称" prop="itemName">
|
||||||
<el-input v-model="form.itemName" placeholder="请输入成本项目名称" />
|
<el-input v-model="form.itemName" placeholder="请输入成本项目名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成本分类 原料/能耗/辅料/设备/人工" prop="category">
|
<el-form-item label="成本分类" prop="category">
|
||||||
<el-input v-model="form.category" placeholder="请输入成本分类 原料/能耗/辅料/设备/人工" />
|
<el-select v-model="form.category" placeholder="请选择成本分类">
|
||||||
|
<el-option label="原料" value="原料" />
|
||||||
|
<el-option label="能耗" value="能耗" />
|
||||||
|
<el-option label="辅料" value="辅料" />
|
||||||
|
<el-option label="设备" value="设备" />
|
||||||
|
<el-option label="人工" value="人工" />
|
||||||
|
<el-option label="产出" value="产出" />
|
||||||
|
<el-option label="轧辊" value="轧辊" />
|
||||||
|
<el-option label="其他" value="其他" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计量单位" prop="unit">
|
<el-form-item label="计量单位" prop="unit">
|
||||||
<el-input v-model="form.unit" placeholder="请输入计量单位" />
|
<el-input v-model="form.unit" placeholder="请输入计量单位" />
|
||||||
@@ -133,6 +160,9 @@
|
|||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="查询条件" prop="queryCondition">
|
||||||
|
<el-input v-model="form.queryCondition" placeholder="请输入查询条件" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<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>
|
||||||
@@ -177,6 +207,7 @@ export default {
|
|||||||
itemName: undefined,
|
itemName: undefined,
|
||||||
category: undefined,
|
category: undefined,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
|
queryCondition: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@@ -212,6 +243,7 @@ export default {
|
|||||||
category: undefined,
|
category: undefined,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
queryCondition: undefined,
|
||||||
delFlag: undefined,
|
delFlag: undefined,
|
||||||
createBy: undefined,
|
createBy: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
|
|||||||
@@ -90,6 +90,14 @@
|
|||||||
<el-table-column label="磷(%)" align="center" prop="p" />
|
<el-table-column label="磷(%)" align="center" prop="p" />
|
||||||
<el-table-column label="硫(%)" align="center" prop="s" />
|
<el-table-column label="硫(%)" align="center" prop="s" />
|
||||||
<el-table-column label="酸溶铝(%)" align="center" prop="als" />
|
<el-table-column label="酸溶铝(%)" align="center" prop="als" />
|
||||||
|
<el-table-column label="铝(%)" align="center" prop="al" />
|
||||||
|
<el-table-column label="钛(%)" align="center" prop="ti" />
|
||||||
|
<el-table-column label="铬(%)" align="center" prop="cr" />
|
||||||
|
<el-table-column label="镍(%)" align="center" prop="ni" />
|
||||||
|
<el-table-column label="铜(%)" align="center" prop="cu" />
|
||||||
|
<el-table-column label="氮(%)" align="center" prop="n" />
|
||||||
|
<el-table-column label="铁(%)" align="center" prop="fe" />
|
||||||
|
<el-table-column label="硼(%)" align="center" prop="b" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -151,6 +159,30 @@
|
|||||||
<el-form-item label="酸溶铝(%)" prop="als">
|
<el-form-item label="酸溶铝(%)" prop="als">
|
||||||
<el-input v-model="form.als" placeholder="请输入酸溶铝(%)" />
|
<el-input v-model="form.als" placeholder="请输入酸溶铝(%)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="铝(%)" prop="al">
|
||||||
|
<el-input v-model="form.al" placeholder="请输入铝(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="钛(%)" prop="ti">
|
||||||
|
<el-input v-model="form.ti" placeholder="请输入钛(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="铬(%)" prop="cr">
|
||||||
|
<el-input v-model="form.cr" placeholder="请输入铬(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="镍(%)" prop="ni">
|
||||||
|
<el-input v-model="form.ni" placeholder="请输入镍(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="铜(%)" prop="cu">
|
||||||
|
<el-input v-model="form.cu" placeholder="请输入铜(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="氮(%)" prop="n">
|
||||||
|
<el-input v-model="form.n" placeholder="请输入氮(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="铁(%)" prop="fe">
|
||||||
|
<el-input v-model="form.fe" placeholder="请输入铁(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="硼(%)" prop="b">
|
||||||
|
<el-input v-model="form.b" placeholder="请输入硼(%)" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -222,6 +254,14 @@
|
|||||||
<el-table-column prop="p" label="P(%)" width="70" align="center" />
|
<el-table-column prop="p" label="P(%)" width="70" align="center" />
|
||||||
<el-table-column prop="s" label="S(%)" width="70" align="center" />
|
<el-table-column prop="s" label="S(%)" width="70" align="center" />
|
||||||
<el-table-column prop="als" label="Als(%)" width="70" align="center" />
|
<el-table-column prop="als" label="Als(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="al" label="Al(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="ti" label="Ti(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="cr" label="Cr(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="ni" label="Ni(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="cu" label="Cu(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="n" label="N(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="fe" label="Fe(%)" width="70" align="center" />
|
||||||
|
<el-table-column prop="b" label="B(%)" width="70" align="center" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -264,7 +304,7 @@ import { listChemicalItem, getChemicalItem, delChemicalItem, addChemicalItem, up
|
|||||||
import CoilSelector from "@/components/CoilSelector";
|
import CoilSelector from "@/components/CoilSelector";
|
||||||
import { listMaterialCoil } from "@/api/wms/coil";
|
import { listMaterialCoil } from "@/api/wms/coil";
|
||||||
|
|
||||||
const CHEMI_TEMPLATE_HEADERS = ['入场钢卷号', 'C(%)', 'Si(%)', 'Mn(%)', 'P(%)', 'S(%)', 'Als(%)'];
|
const CHEMI_TEMPLATE_HEADERS = ['入场钢卷号', 'C(%)', 'Si(%)', 'Mn(%)', 'P(%)', 'S(%)', 'Als(%)', 'Al(%)', 'Ti(%)', 'Cr(%)', 'Ni(%)', 'Cu(%)', 'N(%)', 'Fe(%)', 'B(%)'];
|
||||||
|
|
||||||
const CHEMI_HEADER_MAP = {
|
const CHEMI_HEADER_MAP = {
|
||||||
'入场钢卷号': 'coilNo',
|
'入场钢卷号': 'coilNo',
|
||||||
@@ -273,7 +313,15 @@ const CHEMI_HEADER_MAP = {
|
|||||||
'Mn(%)': 'mn',
|
'Mn(%)': 'mn',
|
||||||
'P(%)': 'p',
|
'P(%)': 'p',
|
||||||
'S(%)': 's',
|
'S(%)': 's',
|
||||||
'Als(%)': 'als'
|
'Als(%)': 'als',
|
||||||
|
'Al(%)': 'al',
|
||||||
|
'Ti(%)': 'ti',
|
||||||
|
'Cr(%)': 'cr',
|
||||||
|
'Ni(%)': 'ni',
|
||||||
|
'Cu(%)': 'cu',
|
||||||
|
'N(%)': 'n',
|
||||||
|
'Fe(%)': 'fe',
|
||||||
|
'B(%)': 'b'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -316,6 +364,14 @@ export default {
|
|||||||
p: undefined,
|
p: undefined,
|
||||||
s: undefined,
|
s: undefined,
|
||||||
als: undefined,
|
als: undefined,
|
||||||
|
al: undefined,
|
||||||
|
ti: undefined,
|
||||||
|
cr: undefined,
|
||||||
|
ni: undefined,
|
||||||
|
cu: undefined,
|
||||||
|
n: undefined,
|
||||||
|
fe: undefined,
|
||||||
|
b: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@@ -372,6 +428,14 @@ export default {
|
|||||||
p: undefined,
|
p: undefined,
|
||||||
s: undefined,
|
s: undefined,
|
||||||
als: undefined,
|
als: undefined,
|
||||||
|
al: undefined,
|
||||||
|
ti: undefined,
|
||||||
|
cr: undefined,
|
||||||
|
ni: undefined,
|
||||||
|
cu: undefined,
|
||||||
|
n: undefined,
|
||||||
|
fe: undefined,
|
||||||
|
b: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
delFlag: undefined,
|
delFlag: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
@@ -523,7 +587,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const payload = rows.map(row => {
|
const payload = rows.map(row => {
|
||||||
const item = { coilId: null, coilNo: row.coilNo };
|
const item = { coilId: null, coilNo: row.coilNo };
|
||||||
['c','si','mn','p','s','als'].forEach(f => { if (row[f]) item[f] = row[f]; });
|
['c','si','mn','p','s','als','al','ti','cr','ni','cu','n','fe','b'].forEach(f => { if (row[f]) item[f] = row[f]; });
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
const addRes = await batchAddChemicalItem(payload);
|
const addRes = await batchAddChemicalItem(payload);
|
||||||
@@ -553,10 +617,10 @@ export default {
|
|||||||
this.$refs.importUpload?.clearFiles();
|
this.$refs.importUpload?.clearFiles();
|
||||||
},
|
},
|
||||||
importDownloadTemplate() {
|
importDownloadTemplate() {
|
||||||
const data = [CHEMI_TEMPLATE_HEADERS, ['示例卷号', '0.05', '0.02', '0.30', '0.015', '0.008', '0.040']];
|
const data = [CHEMI_TEMPLATE_HEADERS, ['示例卷号', '0.05', '0.02', '0.30', '0.015', '0.008', '0.040', '0.04', '0.05', '0.03', '0.02', '0.03', '0.005', '98', '0.001']];
|
||||||
const wb = XLSX.utils.book_new();
|
const wb = XLSX.utils.book_new();
|
||||||
const ws = XLSX.utils.aoa_to_sheet(data);
|
const ws = XLSX.utils.aoa_to_sheet(data);
|
||||||
ws['!cols'] = [{ wch: 16 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }];
|
ws['!cols'] = [{ wch: 16 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 8 }];
|
||||||
XLSX.utils.book_append_sheet(wb, ws, '导入模板');
|
XLSX.utils.book_append_sheet(wb, ws, '导入模板');
|
||||||
XLSX.writeFile(wb, '化学成分导入模板.xlsx');
|
XLSX.writeFile(wb, '化学成分导入模板.xlsx');
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,6 +65,14 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="镀层表面结构" prop="coatingSurfaceStructure">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.coatingSurfaceStructure"
|
||||||
|
placeholder="请输入镀层表面结构"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<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>
|
||||||
@@ -135,10 +143,13 @@
|
|||||||
<el-table-column label="屈服强度(MPa)" align="center" prop="yieldStrength" />
|
<el-table-column label="屈服强度(MPa)" align="center" prop="yieldStrength" />
|
||||||
<el-table-column label="抗拉强度(MPa)" align="center" prop="tensileStrength" />
|
<el-table-column label="抗拉强度(MPa)" align="center" prop="tensileStrength" />
|
||||||
<el-table-column label="伸长率(%)" align="center" prop="elongation" />
|
<el-table-column label="伸长率(%)" align="center" prop="elongation" />
|
||||||
|
<el-table-column label="规定塑性延伸强度(MPa)" align="center" prop="plasticExtensionStrength" />
|
||||||
<el-table-column label="硬度实验(HRB)" align="center" prop="hardness" />
|
<el-table-column label="硬度实验(HRB)" align="center" prop="hardness" />
|
||||||
|
<el-table-column label="镀层重量(g/m²)" align="center" prop="coatingMass" />
|
||||||
<el-table-column label="弯曲试验" align="center" prop="bendingTest" />
|
<el-table-column label="弯曲试验" align="center" prop="bendingTest" />
|
||||||
<el-table-column label="表面质量" align="center" prop="surfaceQuality" />
|
<el-table-column label="表面质量" align="center" prop="surfaceQuality" />
|
||||||
<el-table-column label="表面结构" align="center" prop="surfaceStructure" />
|
<el-table-column label="表面结构" align="center" prop="surfaceStructure" />
|
||||||
|
<el-table-column label="镀层表面结构" align="center" prop="coatingSurfaceStructure" />
|
||||||
<el-table-column label="边缘状态" align="center" prop="edgeStatus" />
|
<el-table-column label="边缘状态" align="center" prop="edgeStatus" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
@@ -189,9 +200,15 @@
|
|||||||
<el-form-item label="伸长率(%)" prop="elongation">
|
<el-form-item label="伸长率(%)" prop="elongation">
|
||||||
<el-input v-model="form.elongation" placeholder="请输入伸长率(%)" />
|
<el-input v-model="form.elongation" placeholder="请输入伸长率(%)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="规定塑性延伸强度(MPa)" prop="plasticExtensionStrength">
|
||||||
|
<el-input v-model="form.plasticExtensionStrength" placeholder="请输入规定塑性延伸强度(MPa)" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="硬度实验(HRB)" prop="hardness">
|
<el-form-item label="硬度实验(HRB)" prop="hardness">
|
||||||
<el-input v-model="form.hardness" placeholder="请输入硬度实验(HRB)" />
|
<el-input v-model="form.hardness" placeholder="请输入硬度实验(HRB)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="镀层重量(g/m²)" prop="coatingMass">
|
||||||
|
<el-input v-model="form.coatingMass" placeholder="请输入镀层重量(g/m²)" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="弯曲试验" prop="bendingTest">
|
<el-form-item label="弯曲试验" prop="bendingTest">
|
||||||
<el-input v-model="form.bendingTest" placeholder="请输入弯曲试验" />
|
<el-input v-model="form.bendingTest" placeholder="请输入弯曲试验" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -201,6 +218,9 @@
|
|||||||
<el-form-item label="表面结构" prop="surfaceStructure">
|
<el-form-item label="表面结构" prop="surfaceStructure">
|
||||||
<el-input v-model="form.surfaceStructure" placeholder="请输入表面结构" />
|
<el-input v-model="form.surfaceStructure" placeholder="请输入表面结构" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="镀层表面结构" prop="coatingSurfaceStructure">
|
||||||
|
<el-input v-model="form.coatingSurfaceStructure" placeholder="请输入镀层表面结构" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -269,10 +289,13 @@
|
|||||||
<el-table-column prop="yieldStrength" label="屈服强度(MPa)" width="110" align="center" />
|
<el-table-column prop="yieldStrength" label="屈服强度(MPa)" width="110" align="center" />
|
||||||
<el-table-column prop="tensileStrength" label="抗拉强度(MPa)" width="110" align="center" />
|
<el-table-column prop="tensileStrength" label="抗拉强度(MPa)" width="110" align="center" />
|
||||||
<el-table-column prop="elongation" label="伸长率(%)" width="80" align="center" />
|
<el-table-column prop="elongation" label="伸长率(%)" width="80" align="center" />
|
||||||
|
<el-table-column prop="plasticExtensionStrength" label="规定塑性延伸强度(MPa)" width="120" align="center" />
|
||||||
<el-table-column prop="hardness" label="硬度(HRB)" width="80" align="center" />
|
<el-table-column prop="hardness" label="硬度(HRB)" width="80" align="center" />
|
||||||
|
<el-table-column prop="coatingMass" label="镀层重量(g/m²)" width="100" align="center" />
|
||||||
<el-table-column prop="bendingTest" label="弯曲试验" width="80" align="center" />
|
<el-table-column prop="bendingTest" label="弯曲试验" width="80" align="center" />
|
||||||
<el-table-column prop="surfaceQuality" label="表面质量" width="80" align="center" />
|
<el-table-column prop="surfaceQuality" label="表面质量" width="80" align="center" />
|
||||||
<el-table-column prop="surfaceStructure" label="表面结构" width="80" align="center" />
|
<el-table-column prop="surfaceStructure" label="表面结构" width="80" align="center" />
|
||||||
|
<el-table-column prop="coatingSurfaceStructure" label="镀层表面结构" width="90" align="center" />
|
||||||
<el-table-column prop="edgeStatus" label="边缘状态" width="80" align="center" />
|
<el-table-column prop="edgeStatus" label="边缘状态" width="80" align="center" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -320,8 +343,8 @@ import CoilSelector from "@/components/CoilSelector";
|
|||||||
import { listMaterialCoil } from "@/api/wms/coil";
|
import { listMaterialCoil } from "@/api/wms/coil";
|
||||||
|
|
||||||
const PHYS_TEMPLATE_HEADERS = [
|
const PHYS_TEMPLATE_HEADERS = [
|
||||||
'当前钢卷号', '屈服强度(MPa)', '抗拉强度(MPa)', '伸长率(%)', '硬度(HRB)', '弯曲试验',
|
'当前钢卷号', '屈服强度(MPa)', '抗拉强度(MPa)', '伸长率(%)', '规定塑性延伸强度(MPa)', '硬度(HRB)',
|
||||||
'表面质量', '表面结构', '边缘状态'
|
'镀层重量(g/m²)', '弯曲试验', '表面质量', '表面结构', '镀层表面结构', '边缘状态'
|
||||||
];
|
];
|
||||||
|
|
||||||
const PHYS_HEADER_MAP = {
|
const PHYS_HEADER_MAP = {
|
||||||
@@ -329,10 +352,13 @@ const PHYS_HEADER_MAP = {
|
|||||||
'屈服强度(MPa)': 'yieldStrength',
|
'屈服强度(MPa)': 'yieldStrength',
|
||||||
'抗拉强度(MPa)': 'tensileStrength',
|
'抗拉强度(MPa)': 'tensileStrength',
|
||||||
'伸长率(%)': 'elongation',
|
'伸长率(%)': 'elongation',
|
||||||
|
'规定塑性延伸强度(MPa)': 'plasticExtensionStrength',
|
||||||
'硬度(HRB)': 'hardness',
|
'硬度(HRB)': 'hardness',
|
||||||
|
'镀层重量(g/m²)': 'coatingMass',
|
||||||
'弯曲试验': 'bendingTest',
|
'弯曲试验': 'bendingTest',
|
||||||
'表面质量': 'surfaceQuality',
|
'表面质量': 'surfaceQuality',
|
||||||
'表面结构': 'surfaceStructure',
|
'表面结构': 'surfaceStructure',
|
||||||
|
'镀层表面结构': 'coatingSurfaceStructure',
|
||||||
'边缘状态': 'edgeStatus'
|
'边缘状态': 'edgeStatus'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -372,10 +398,13 @@ export default {
|
|||||||
yieldStrength: undefined,
|
yieldStrength: undefined,
|
||||||
tensileStrength: undefined,
|
tensileStrength: undefined,
|
||||||
elongation: undefined,
|
elongation: undefined,
|
||||||
|
plasticExtensionStrength: undefined,
|
||||||
hardness: undefined,
|
hardness: undefined,
|
||||||
|
coatingMass: undefined,
|
||||||
bendingTest: undefined,
|
bendingTest: undefined,
|
||||||
surfaceQuality: undefined,
|
surfaceQuality: undefined,
|
||||||
surfaceStructure: undefined,
|
surfaceStructure: undefined,
|
||||||
|
coatingSurfaceStructure: undefined,
|
||||||
edgeStatus: undefined,
|
edgeStatus: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
@@ -429,10 +458,13 @@ export default {
|
|||||||
yieldStrength: undefined,
|
yieldStrength: undefined,
|
||||||
tensileStrength: undefined,
|
tensileStrength: undefined,
|
||||||
elongation: undefined,
|
elongation: undefined,
|
||||||
|
plasticExtensionStrength: undefined,
|
||||||
hardness: undefined,
|
hardness: undefined,
|
||||||
|
coatingMass: undefined,
|
||||||
bendingTest: undefined,
|
bendingTest: undefined,
|
||||||
surfaceQuality: undefined,
|
surfaceQuality: undefined,
|
||||||
surfaceStructure: undefined,
|
surfaceStructure: undefined,
|
||||||
|
coatingSurfaceStructure: undefined,
|
||||||
edgeStatus: undefined,
|
edgeStatus: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
delFlag: undefined,
|
delFlag: undefined,
|
||||||
@@ -585,7 +617,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const payload = rows.map(row => {
|
const payload = rows.map(row => {
|
||||||
const item = { coilId: null, coilNo: row.coilNo };
|
const item = { coilId: null, coilNo: row.coilNo };
|
||||||
['yieldStrength','tensileStrength','elongation','hardness','bendingTest','surfaceQuality','surfaceStructure','edgeStatus'].forEach(f => { if (row[f]) item[f] = row[f]; });
|
['yieldStrength','tensileStrength','elongation','plasticExtensionStrength','hardness','coatingMass','bendingTest','surfaceQuality','surfaceStructure','coatingSurfaceStructure','edgeStatus'].forEach(f => { if (row[f]) item[f] = row[f]; });
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
const addRes = await batchAddPhysicalItem(payload);
|
const addRes = await batchAddPhysicalItem(payload);
|
||||||
@@ -615,10 +647,10 @@ export default {
|
|||||||
this.$refs.importUpload?.clearFiles();
|
this.$refs.importUpload?.clearFiles();
|
||||||
},
|
},
|
||||||
importDownloadTemplate() {
|
importDownloadTemplate() {
|
||||||
const data = [PHYS_TEMPLATE_HEADERS, ['示例卷号', '300', '420', '35', '85', '合格', '良好', '光面', '良好']];
|
const data = [PHYS_TEMPLATE_HEADERS, ['示例卷号', '300', '420', '35', '260', '85', '275', '合格', '良好', '光面', '无锌花', '良好']];
|
||||||
const wb = XLSX.utils.book_new();
|
const wb = XLSX.utils.book_new();
|
||||||
const ws = XLSX.utils.aoa_to_sheet(data);
|
const ws = XLSX.utils.aoa_to_sheet(data);
|
||||||
ws['!cols'] = [{ wch: 16 }, { wch: 16 }, { wch: 16 }, { wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 10 }];
|
ws['!cols'] = [{ wch: 16 }, { wch: 16 }, { wch: 16 }, { wch: 10 }, { wch: 20 }, { wch: 10 }, { wch: 16 }, { wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 10 }];
|
||||||
XLSX.utils.book_append_sheet(wb, ws, '导入模板');
|
XLSX.utils.book_append_sheet(wb, ws, '导入模板');
|
||||||
XLSX.writeFile(wb, '物理性能导入模板.xlsx');
|
XLSX.writeFile(wb, '物理性能导入模板.xlsx');
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -103,8 +103,8 @@
|
|||||||
<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 icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button>
|
<el-button icon="el-icon-download" size="mini" @click="handleNewExport" v-if="showNewExport">导出</el-button>
|
||||||
<el-button type="danger" v-if="showWaybill" plain icon="el-icon-close" size="mini" :disabled="multiple" :loading="buttonLoading"
|
<el-button type="danger" v-if="showWaybill" plain icon="el-icon-close" size="mini" :disabled="multiple"
|
||||||
@click="handleBatchRemoveFromWaybill">批量移出发货单</el-button>
|
:loading="buttonLoading" @click="handleBatchRemoveFromWaybill">批量移出发货单</el-button>
|
||||||
</el-form-item>
|
</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">
|
||||||
@@ -2475,6 +2475,10 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table .el-button+.el-button {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .el-table {
|
::v-deep .el-table {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,8 +478,9 @@ export default {
|
|||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
a.target = '_blank';
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
@@ -476,8 +476,9 @@ export default {
|
|||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
a.target = '_blank';
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
@@ -478,8 +478,9 @@ export default {
|
|||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
a.target = '_blank';
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
@@ -35,7 +35,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<span class="label">订单号:</span>
|
<span class="label">订单号:</span>
|
||||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.orderId ? localWaybill.orderCode : localWaybill.principalPhone }}</div>
|
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.orderId ?
|
||||||
|
localWaybill.orderCode : localWaybill.principalPhone }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<span class="label">合同号:</span>
|
<span class="label">合同号:</span>
|
||||||
@@ -475,16 +476,14 @@ export default {
|
|||||||
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
|
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const win = window.open(url, '_blank');
|
const a = document.createElement('a');
|
||||||
if (!win) {
|
a.target = '_blank';
|
||||||
this.$message.error('打印失败,请检查浏览器设置');
|
a.href = url;
|
||||||
// const a = document.createElement('a');
|
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
||||||
// a.href = url;
|
document.body.appendChild(a);
|
||||||
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || new Date().getTime()}.pdf`;
|
a.click();
|
||||||
// document.body.appendChild(a);
|
document.body.removeChild(a);
|
||||||
// a.click();
|
URL.revokeObjectURL(url);
|
||||||
// document.body.removeChild(a);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async exportExcel() {
|
async exportExcel() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -477,8 +477,9 @@ export default {
|
|||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
a.target = '_blank';
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
@@ -476,8 +476,9 @@ export default {
|
|||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
|
a.target = '_blank';
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
// a.download = `发货单_${this.waybill.waybillName || this.waybill.waybillNo || Date.now()}.pdf`;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
Reference in New Issue
Block a user