aaa
This commit is contained in:
parent
fa512a8bad
commit
2f25b02533
@ -140,7 +140,7 @@ export function uploadPDF(id) {
|
|||||||
// 下载生产工艺计划表
|
// 下载生产工艺计划表
|
||||||
export function exportRoute(id) {
|
export function exportRoute(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/system/orderPro/exportRoute?id=${id}`,
|
url: `/system/orderPro/exportRoute2?id=${id}`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -91,11 +91,11 @@ export function delRoute(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function pushRouteBom(rooteProdet) {
|
export function pushRouteBom(rooteProdet, groupName) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/route/pushRouteBom',
|
url: '/system/route/pushRouteBom',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { rooteProdet },
|
params: { rooteProdet, groupName },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
export function updateProcessPlan(rooteProdet, ids) {
|
export function updateProcessPlan(rooteProdet, ids) {
|
||||||
|
|||||||
44
src/api/system/spec35r.js
Normal file
44
src/api/system/spec35r.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询35R设备规格参数列表
|
||||||
|
export function listSpec35r(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/spec35r/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询35R设备规格参数详细
|
||||||
|
export function getSpec35r(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/spec35r/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增35R设备规格参数
|
||||||
|
export function addSpec35r(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/spec35r',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改35R设备规格参数
|
||||||
|
export function updateSpec35r(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/spec35r',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除35R设备规格参数
|
||||||
|
export function delSpec35r(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/spec35r/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -128,6 +128,15 @@
|
|||||||
>导入
|
>导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-input
|
||||||
|
v-model="groupName"
|
||||||
|
placeholder="请输入上传分组"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -385,7 +394,8 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
},
|
||||||
|
groupName: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -481,23 +491,31 @@ export default {
|
|||||||
updateFBMaterial(row) {
|
updateFBMaterial(row) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.reset();
|
this.reset();
|
||||||
|
if (!this.ids || this.ids.length === 0) {
|
||||||
// 获取选中行的数据
|
this.$modal.msgError("请先选择要上传的行!");
|
||||||
|
this.loading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.groupName || !this.groupName.trim()) {
|
||||||
|
this.$modal.msgError("请填写上传分组!");
|
||||||
|
this.loading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const selectedData = this.ids.map(id => {
|
const selectedData = this.ids.map(id => {
|
||||||
const item = this.detailsList.find(row => row.id === id);
|
const item = this.detailsList.find(row => row.id === id);
|
||||||
return {
|
return {
|
||||||
fnumber: item.fnumber, // 物料编码
|
fnumber: item.fnumber,
|
||||||
totalWeight: item.totalWeight // 生产令号
|
totalWeight: item.totalWeight,
|
||||||
|
groupName: this.groupName.trim()
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('发送数据:', selectedData);
|
|
||||||
|
|
||||||
// 调用接口
|
|
||||||
updateFBl(selectedData).then(response => {
|
updateFBl(selectedData).then(response => {
|
||||||
this.form = response;
|
this.form = response;
|
||||||
const successCount = response.length;
|
const successCount = response.length;
|
||||||
this.resNotice(successCount);
|
this.resNotice(successCount);
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('更新BOM失败:', error);
|
||||||
|
this.$modal.msgError("更新BOM失败,请重试!");
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||||
v-hasPermi="['system:route:add']">新增
|
v-hasPermi="['system:route:add']">新增
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||||
v-hasPermi="['system:route:remove']">删除
|
v-hasPermi="['system:route:remove']">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>-->
|
||||||
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleExport"
|
<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||||
@ -57,6 +57,14 @@
|
|||||||
v-hasPermi="['system:details:pushRouteBom']">推送工艺
|
v-hasPermi="['system:details:pushRouteBom']">推送工艺
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-input
|
||||||
|
v-model="routeGroupName"
|
||||||
|
placeholder="请输入推送分组"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="updateProcessPlan"
|
<el-button type="danger" plain icon="el-icon-edit" size="mini" :disabled="multiple" @click="updateProcessPlan"
|
||||||
v-hasPermi="['system:details:updateProcessPlan']">更新计划时间
|
v-hasPermi="['system:details:updateProcessPlan']">更新计划时间
|
||||||
@ -591,8 +599,10 @@
|
|||||||
<el-table-column label="物料名称" prop="materialName" min-width="140" align="center"/>
|
<el-table-column label="物料名称" prop="materialName" min-width="140" align="center"/>
|
||||||
<el-table-column label="操作" width="120" align="center">
|
<el-table-column label="操作" width="120" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="handleViewRoute(scope.row)"
|
<el-button
|
||||||
:type="selectedRouteId === scope.row.id ? 'success' : 'primary'">
|
type="text"
|
||||||
|
@click="handleViewRoute(scope.row)"
|
||||||
|
:type="selectedRouteId === scope.row.id ? 'success' : 'primary'">
|
||||||
{{ selectedRouteId === scope.row.id ? '查看中' : '查看' }}
|
{{ selectedRouteId === scope.row.id ? '查看中' : '查看' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -646,7 +656,7 @@ DictData.install();
|
|||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
dicts: ['work_center'],
|
dicts: ['work_center'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Fromed,
|
Fromed,
|
||||||
Bomfrom
|
Bomfrom
|
||||||
@ -927,6 +937,7 @@ export default {
|
|||||||
selectedRoute: null, // 当前选中的工艺路线完整信息
|
selectedRoute: null, // 当前选中的工艺路线完整信息
|
||||||
currentProcessList: [], // 当前显示的工序列表
|
currentProcessList: [], // 当前显示的工序列表
|
||||||
dataList: [], // 存储获取到的数据
|
dataList: [], // 存储获取到的数据
|
||||||
|
routeGroupName: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -935,7 +946,7 @@ export default {
|
|||||||
if (this.params && this.params.productionOrderNo) {
|
if (this.params && this.params.productionOrderNo) {
|
||||||
this.queryParams.routeDescription = this.params.productionOrderNo;
|
this.queryParams.routeDescription = this.params.productionOrderNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// const productionOrderNo = this.params.productionOrderNo;
|
// const productionOrderNo = this.params.productionOrderNo;
|
||||||
// if (productionOrderNo) {
|
// if (productionOrderNo) {
|
||||||
@ -1512,6 +1523,10 @@ export default {
|
|||||||
this.$modal.msgError("未获取到生产订单号,请检查!");
|
this.$modal.msgError("未获取到生产订单号,请检查!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!this.routeGroupName || !this.routeGroupName.trim()) {
|
||||||
|
this.$modal.msgError("请填写分组名称!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// 显示确认对话框
|
// 显示确认对话框
|
||||||
await this.$confirm(
|
await this.$confirm(
|
||||||
@ -1541,14 +1556,14 @@ export default {
|
|||||||
});
|
});
|
||||||
// 调用推送 API 并设置超时
|
// 调用推送 API 并设置超时
|
||||||
const response = await Promise.race([
|
const response = await Promise.race([
|
||||||
pushRouteBom(productionOrderNo),
|
pushRouteBom(productionOrderNo, this.routeGroupName.trim()),
|
||||||
timeoutPromise
|
timeoutPromise
|
||||||
]);
|
]);
|
||||||
// 处理后端返回的数据 - 适配新的返回结构 R<ProcessRoutePushResultDTO>
|
// 处理后端返回的数据 - 适配新的返回结构 R<ProcessRoutePushResultDTO>
|
||||||
const {duplicateRoutes, failedRoutes, successfulRoutes} = response.data;
|
const {duplicateRoutes, failedRoutes, successfulRoutes} = response.data;
|
||||||
// 提取物料编码和错误信息
|
// 提取物料编码和错误信息
|
||||||
const duplicateCodes = duplicateRoutes.join(', ');
|
const duplicateCodes = duplicateRoutes.join(', ');
|
||||||
const failedInfo = failedRoutes.map(route =>
|
const failedInfo = failedRoutes.map(route =>
|
||||||
`${route.materialCode} (${route.errorMessage || '未知错误'})`
|
`${route.materialCode} (${route.errorMessage || '未知错误'})`
|
||||||
).join(', ');
|
).join(', ');
|
||||||
const successfulCodes = successfulRoutes.map(route => route.materialCode).join(', ');
|
const successfulCodes = successfulRoutes.map(route => route.materialCode).join(', ');
|
||||||
@ -1607,7 +1622,7 @@ export default {
|
|||||||
const rooteProdet = this.params.productionOrderNo;
|
const rooteProdet = this.params.productionOrderNo;
|
||||||
//获取物料编码
|
//获取物料编码
|
||||||
const materialCode = this.params.materialCode;
|
const materialCode = this.params.materialCode;
|
||||||
|
|
||||||
console.log(rooteProdet);
|
console.log(rooteProdet);
|
||||||
|
|
||||||
// 调用封装好的 API 方法(带勾选的 ids)
|
// 调用封装好的 API 方法(带勾选的 ids)
|
||||||
|
|||||||
486
src/views/system/spec35r/index.vue
Normal file
486
src/views/system/spec35r/index.vue
Normal file
@ -0,0 +1,486 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="行程变量" prop="travelLength">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.travelLength"
|
||||||
|
placeholder="请输入行程变量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<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-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:spec35r:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:spec35r:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:spec35r:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:spec35r:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="spec35rList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键ID" align="center" prop="id" v-if="true"/>
|
||||||
|
<el-table-column label="行程变量" align="center" prop="travelLength" />
|
||||||
|
<el-table-column label="类型" align="center" prop="itemType" />
|
||||||
|
<el-table-column label="轴向" align="center" prop="axialType" />
|
||||||
|
<el-table-column label="箱体" align="center" prop="boxType" />
|
||||||
|
<el-table-column label="V1" align="center" prop="V1" />
|
||||||
|
<el-table-column label="V2" align="center" prop="V2" />
|
||||||
|
<el-table-column label="V3" align="center" prop="V3" />
|
||||||
|
<el-table-column label="V5" align="center" prop="V5" />
|
||||||
|
<el-table-column label="V6" align="center" prop="V6" />
|
||||||
|
<el-table-column label="V8" align="center" prop="V8" />
|
||||||
|
<el-table-column label="G1" align="center" prop="G1" />
|
||||||
|
<el-table-column label="V9" align="center" prop="V9" />
|
||||||
|
<el-table-column label="G2" align="center" prop="G2" />
|
||||||
|
<el-table-column label="V10" align="center" prop="V10" />
|
||||||
|
<el-table-column label="G5" align="center" prop="G5" />
|
||||||
|
<el-table-column label="V12" align="center" prop="V12" />
|
||||||
|
<el-table-column label="G6" align="center" prop="G6" />
|
||||||
|
<el-table-column label="V14" align="center" prop="V14" />
|
||||||
|
<el-table-column label="G7" align="center" prop="G7" />
|
||||||
|
<el-table-column label="V41" align="center" prop="V41" />
|
||||||
|
<el-table-column label="V42" align="center" prop="V42" />
|
||||||
|
<el-table-column label="V43" align="center" prop="V43" />
|
||||||
|
<el-table-column label="V44" align="center" prop="V44" />
|
||||||
|
<el-table-column label="V45" align="center" prop="V45" />
|
||||||
|
<el-table-column label="V46" align="center" prop="V46" />
|
||||||
|
<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-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:spec35r:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:spec35r:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改35R设备规格参数对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="行程变量" prop="travelLength">
|
||||||
|
<el-input v-model="form.travelLength" placeholder="请输入行程变量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V1" prop="V1">
|
||||||
|
<el-input v-model="form.V1" placeholder="请输入行程" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V2" prop="V2">
|
||||||
|
<el-input v-model="form.V2" placeholder="请输入设备总长" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V3" prop="V3">
|
||||||
|
<el-input v-model="form.V3" placeholder="请输入地脚位置1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V5" prop="V5">
|
||||||
|
<el-input v-model="form.V5" placeholder="请输入箱体装配长度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V6" prop="V6">
|
||||||
|
<el-input v-model="form.V6" placeholder="请输入箱体地脚位置1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V8" prop="V8">
|
||||||
|
<el-input v-model="form.V8" placeholder="请输入铝箱长度1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="G1" prop="G1">
|
||||||
|
<el-input v-model="form.G1" placeholder="请输入铝箱1重量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V9" prop="V9">
|
||||||
|
<el-input v-model="form.V9" placeholder="请输入铝箱长度2" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="G2" prop="G2">
|
||||||
|
<el-input v-model="form.G2" placeholder="请输入铝箱2重量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V10" prop="V10">
|
||||||
|
<el-input v-model="form.V10" placeholder="请输入导向条长度1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="G5" prop="G5">
|
||||||
|
<el-input v-model="form.G5" placeholder="请输入导向条1单重" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V12" prop="V12">
|
||||||
|
<el-input v-model="form.V12" placeholder="请输入导向条长度2" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="G6" prop="G6">
|
||||||
|
<el-input v-model="form.G6" placeholder="请输入导向条2单重" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V14" prop="V14">
|
||||||
|
<el-input v-model="form.V14" placeholder="请输入导向条长度3" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="G7" prop="G7">
|
||||||
|
<el-input v-model="form.G7" placeholder="请输入导向条3单重" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V41" prop="V41">
|
||||||
|
<el-input v-model="form.V41" placeholder="请输入轴挡" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V42" prop="V42">
|
||||||
|
<el-input v-model="form.V42" placeholder="请输入35E链条滚轮" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V43" prop="V43">
|
||||||
|
<el-input v-model="form.V43" placeholder="请输入35E垫圈" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V44" prop="V44">
|
||||||
|
<el-input v-model="form.V44" placeholder="请输入35R链节轴2" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V45" prop="V45">
|
||||||
|
<el-input v-model="form.V45" placeholder="请输入35E链节轴2" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="V46" prop="V46">
|
||||||
|
<el-input v-model="form.V46" placeholder="请输入35E链板" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listSpec35r, getSpec35r, delSpec35r, addSpec35r, updateSpec35r } from "@/api/system/spec35r";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Spec35r",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 35R设备规格参数表格数据
|
||||||
|
spec35rList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
travelLength: undefined,
|
||||||
|
itemType: undefined,
|
||||||
|
axialType: undefined,
|
||||||
|
boxType: undefined,
|
||||||
|
V1: undefined,
|
||||||
|
V2: undefined,
|
||||||
|
V3: undefined,
|
||||||
|
V5: undefined,
|
||||||
|
V6: undefined,
|
||||||
|
V8: undefined,
|
||||||
|
G1: undefined,
|
||||||
|
V9: undefined,
|
||||||
|
G2: undefined,
|
||||||
|
V10: undefined,
|
||||||
|
G5: undefined,
|
||||||
|
V12: undefined,
|
||||||
|
G6: undefined,
|
||||||
|
V14: undefined,
|
||||||
|
G7: undefined,
|
||||||
|
V41: undefined,
|
||||||
|
V42: undefined,
|
||||||
|
V43: undefined,
|
||||||
|
V44: undefined,
|
||||||
|
V45: undefined,
|
||||||
|
V46: undefined,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
id: [
|
||||||
|
{ required: true, message: "主键ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
travelLength: [
|
||||||
|
{ required: true, message: "行程变量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
itemType: [
|
||||||
|
{ required: true, message: "类型不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
axialType: [
|
||||||
|
{ required: true, message: "轴向不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
boxType: [
|
||||||
|
{ required: true, message: "箱体不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
V1: [
|
||||||
|
{ required: true, message: "行程不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V2: [
|
||||||
|
{ required: true, message: "设备总长不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V3: [
|
||||||
|
{ required: true, message: "地脚位置1不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V5: [
|
||||||
|
{ required: true, message: "箱体装配长度不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V6: [
|
||||||
|
{ required: true, message: "箱体地脚位置1不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V8: [
|
||||||
|
{ required: true, message: "铝箱长度1不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
G1: [
|
||||||
|
{ required: true, message: "铝箱1重量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V9: [
|
||||||
|
{ required: true, message: "铝箱长度2不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
G2: [
|
||||||
|
{ required: true, message: "铝箱2重量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V10: [
|
||||||
|
{ required: true, message: "导向条长度1不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
G5: [
|
||||||
|
{ required: true, message: "导向条1单重不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V12: [
|
||||||
|
{ required: true, message: "导向条长度2不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
G6: [
|
||||||
|
{ required: true, message: "导向条2单重不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V14: [
|
||||||
|
{ required: true, message: "导向条长度3不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
G7: [
|
||||||
|
{ required: true, message: "导向条3单重不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V41: [
|
||||||
|
{ required: true, message: "轴挡不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V42: [
|
||||||
|
{ required: true, message: "35E链条滚轮不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V43: [
|
||||||
|
{ required: true, message: "35E垫圈不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V44: [
|
||||||
|
{ required: true, message: "35R链节轴2不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V45: [
|
||||||
|
{ required: true, message: "35E链节轴2不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
V46: [
|
||||||
|
{ required: true, message: "35E链板不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
normalizeRowKeys(row) {
|
||||||
|
const keys = Object.keys(row);
|
||||||
|
keys.forEach(k => {
|
||||||
|
if (/^(v\d+|g\d+)$/i.test(k)) {
|
||||||
|
const upper = k.toUpperCase();
|
||||||
|
if (row[upper] === undefined) row[upper] = row[k];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return row;
|
||||||
|
},
|
||||||
|
/** 查询35R设备规格参数列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listSpec35r(this.queryParams).then(response => {
|
||||||
|
this.spec35rList = (response.rows || []).map(r => this.normalizeRowKeys(r));
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
travelLength: undefined,
|
||||||
|
itemType: undefined,
|
||||||
|
axialType: undefined,
|
||||||
|
boxType: undefined,
|
||||||
|
V1: undefined,
|
||||||
|
V2: undefined,
|
||||||
|
V3: undefined,
|
||||||
|
V5: undefined,
|
||||||
|
V6: undefined,
|
||||||
|
V8: undefined,
|
||||||
|
G1: undefined,
|
||||||
|
V9: undefined,
|
||||||
|
G2: undefined,
|
||||||
|
V10: undefined,
|
||||||
|
G5: undefined,
|
||||||
|
V12: undefined,
|
||||||
|
G6: undefined,
|
||||||
|
V14: undefined,
|
||||||
|
G7: undefined,
|
||||||
|
V41: undefined,
|
||||||
|
V42: undefined,
|
||||||
|
V43: undefined,
|
||||||
|
V44: undefined,
|
||||||
|
V45: undefined,
|
||||||
|
V46: undefined,
|
||||||
|
createTime: undefined,
|
||||||
|
updateTime: undefined,
|
||||||
|
createBy: undefined,
|
||||||
|
updateBy: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加35R设备规格参数";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.loading = true;
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getSpec35r(id).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
this.form = this.normalizeRowKeys(response.data || {});
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改35R设备规格参数";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateSpec35r(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addSpec35r(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除35R设备规格参数编号为"' + ids + '"的数据项?').then(() => {
|
||||||
|
this.loading = true;
|
||||||
|
return delSpec35r(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/spec35r/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `spec35r_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user