Compare commits
No commits in common. "549d66f7533deb903b4c4dad0911128fd31fc12d" and "ca129f54345a16ecd3cecf5a483f8642a96271ef" have entirely different histories.
549d66f753
...
ca129f5434
@ -34,15 +34,6 @@ export function workOrderList(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 条件获得工单列表
|
|
||||||
export function getFreeWOlist(query) {
|
|
||||||
return request({
|
|
||||||
url: '/base/core-work-order/getFreeWOlist',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获得订单分页
|
// 获得订单分页
|
||||||
export function getOrderPage(query) {
|
export function getOrderPage(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-02-21 13:43:02
|
* @Date: 2024-02-21 13:43:02
|
||||||
* @LastEditTime: 2024-03-14 19:12:31
|
* @LastEditTime: 2024-02-21 15:00:17
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -33,21 +33,3 @@ export function listByParentId(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得产线工段设备树形结构
|
|
||||||
export function getTree(query) {
|
|
||||||
return request({
|
|
||||||
url: '/base/core-factory/getTree',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获得设备分组列表
|
|
||||||
export function getgroupAllList(query) {
|
|
||||||
return request({
|
|
||||||
url: '/base/equipment-group/listAll',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -32,7 +32,7 @@ import { parseTime } from '../../core/mixins/code-filter';
|
|||||||
import {
|
import {
|
||||||
getcoreAlarmLogPage
|
getcoreAlarmLogPage
|
||||||
} from '@/api/base/coreAlarmLog';
|
} from '@/api/base/coreAlarmLog';
|
||||||
import {DICT_TYPE, getDictDatas, publicFormatter } from "@/utils/dict";
|
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -50,8 +50,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'alarmGrade',
|
prop: 'alarmGrade',
|
||||||
label: '报警级别',
|
label: '报警级别'
|
||||||
filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL)
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'alarmReason',
|
prop: 'alarmReason',
|
||||||
|
@ -7,11 +7,10 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="true"
|
:wrapper-closable="false"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
:before-close="beforeClose"
|
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
size="60%"
|
size="60%"
|
||||||
@closed="$emit('destroy')">
|
@closed="$emit('destroy')">
|
||||||
@ -82,12 +81,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="mode == 'edit'" class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||||
编辑
|
编辑
|
||||||
</el-button> -->
|
</el-button>
|
||||||
<el-button type="primary" @click="handleConfirm">保存</el-button>
|
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="sections[1].allowAdd"
|
v-if="sections[1].allowAdd"
|
||||||
@ -299,17 +298,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beforeClose(done) {
|
|
||||||
if (this.mode.includes('edit')) {
|
|
||||||
this.$confirm('确认关闭?')
|
|
||||||
.then(_ => {
|
|
||||||
done();
|
|
||||||
})
|
|
||||||
.catch(_ => {});
|
|
||||||
} else {
|
|
||||||
done()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleTableBtnClick({ type, data }) {
|
handleTableBtnClick({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
|
@ -486,7 +486,6 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
special: false
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
@ -298,9 +298,9 @@ export default {
|
|||||||
// 工段排序
|
// 工段排序
|
||||||
sort: undefined,
|
sort: undefined,
|
||||||
// 产线统计类型
|
// 产线统计类型
|
||||||
lineDataType: 0,
|
lineDataType: undefined,
|
||||||
// 工段统计类型
|
// 工段统计类型
|
||||||
sectionDataType: 0,
|
sectionDataType: undefined,
|
||||||
};
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-14 10:02:53
|
* @LastEditTime: 2023-12-14 13:52:42
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -169,7 +169,7 @@ export default {
|
|||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
if (this.test.length > 1 || this.test[0]?.name) {
|
if (this.test.length > 1 || this.test[0].name) {
|
||||||
this.test.forEach(check => {
|
this.test.forEach(check => {
|
||||||
check.hotMaterialId = this.dataForm.id
|
check.hotMaterialId = this.dataForm.id
|
||||||
if (check.id) {
|
if (check.id) {
|
||||||
@ -191,7 +191,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
if (this.test.length > 1 || this.test[0]?.name) {
|
if (this.test.length > 1 || this.test[0].name) {
|
||||||
this.test.forEach(check => {
|
this.test.forEach(check => {
|
||||||
check.hotMaterialId = response.data
|
check.hotMaterialId = response.data
|
||||||
createHotMaterialCheck(check).then(res => {
|
createHotMaterialCheck(check).then(res => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 13:54:01
|
* @LastEditTime: 2024-02-29 15:01:25
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -254,7 +254,7 @@ export default {
|
|||||||
dataRule: {
|
dataRule: {
|
||||||
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
|
||||||
specifications: [{ required: false, message: "规格不能为空", trigger: "blur" }],
|
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
||||||
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
||||||
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
|
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 13:54:48
|
* @LastEditTime: 2024-03-01 19:52:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -33,7 +33,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.roomNameDict"
|
v-model="dataForm.roomNameDict"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择车间名称">
|
placeholder="请选择车间名称">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
<el-radio :label="1">产品基础BOM</el-radio>
|
<el-radio :label="1">产品基础BOM</el-radio>
|
||||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||||
</el-radio-group> -->
|
</el-radio-group> -->
|
||||||
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" clearable @change="materialMethodChange">
|
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" @change="materialMethodChange">
|
||||||
<el-option key="1" label="产品基础BOM" :value="1" />
|
<el-option key="1" label="产品基础BOM" :value="1" />
|
||||||
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -92,7 +92,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="dataForm.priority" clearable placeholder="请选择优先级" style="width: 100%;">
|
<el-select v-model="dataForm.priority" placeholder="请选择优先级" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -104,7 +104,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="dataForm.type" clearable placeholder="请选择工单类型" style="width: 100%;">
|
<el-select v-model="dataForm.type" placeholder="请选择工单类型" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workOrderTypeList"
|
v-for="item in workOrderTypeList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -121,7 +121,6 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.roomNameDict"
|
v-model="dataForm.roomNameDict"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择车间名称">
|
placeholder="请选择车间名称">
|
||||||
<el-option
|
<el-option
|
||||||
@ -134,7 +133,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="关联产线" prop="productLineIds">
|
<el-form-item label="关联产线" prop="productLineIds">
|
||||||
<el-select v-model="dataForm.productLineIds" clearable placeholder="请选择关联产线" multiple style="width: 100%;">
|
<el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in productLineList"
|
v-for="item in productLineList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -146,7 +145,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='8'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="负责人" prop="workers">
|
<el-form-item label="负责人" prop="workers">
|
||||||
<el-input v-model="dataForm.workers" clearable placeholder="请输入负责人"></el-input>
|
<el-input v-model="dataForm.workers" placeholder="请输入负责人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -205,8 +204,7 @@ export default {
|
|||||||
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
||||||
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
||||||
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
|
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
|
||||||
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }],
|
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
|
||||||
materialMethod: [{ required: true, message: "物料计算方式不能为空", trigger: "change" }]
|
|
||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 14:47:44
|
* @LastEditTime: 2024-02-29 10:01:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -18,28 +18,15 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="formContent">
|
<div class="formContent">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
|
||||||
<div class="blodTip">工单名称</div>
|
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
|
||||||
<div class="lightTip">{{ dataForm.name }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="blodTip">工单编码</div>
|
|
||||||
<div class="lightTip">{{ dataForm.code }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<div class="blodTip">产品名称</div>
|
|
||||||
<div class="lightTip">{{ dataForm.productName }}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
|
||||||
<div class="blodTip">产品规格</div>
|
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
|
||||||
<div class="lightTip">{{ dataForm.specifications }}</div>
|
</el-row>
|
||||||
</el-col>
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
|
||||||
<div class="blodTip">实际生产数量</div>
|
|
||||||
<div class="lightTip">{{ dataForm.expectedTime }}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -309,18 +296,4 @@ export default {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.blodTip {
|
|
||||||
height: 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: rgba(0,0,0,0.85);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
.lightTip {
|
|
||||||
/* height: 16px; */
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: rgba(102,102,102,0.75);
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 14:42:32
|
* @LastEditTime: 2024-02-29 15:35:02
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -274,10 +274,6 @@ const tableProps1 = [
|
|||||||
prop: 'remaining',
|
prop: 'remaining',
|
||||||
label: '剩余生产预计消耗'
|
label: '剩余生产预计消耗'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'num',
|
|
||||||
label: '库存数量'
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -2,20 +2,44 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick"
|
||||||
|
/>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
<base-table
|
||||||
:max-height="tableH" @selection-change="selectChange">
|
:page="queryParams.pageNo"
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
:limit="queryParams.pageSize"
|
||||||
@clickBtn="handleClick" />
|
:table-props="tableProps"
|
||||||
|
:table-data="list"
|
||||||
|
:max-height="tableH"
|
||||||
|
@selection-change="selectChange"
|
||||||
|
>
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick"
|
||||||
|
/>
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
<pagination
|
||||||
@pagination="getList" />
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:total="total"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
<base-dialog
|
||||||
@confirm="handleConfirm" :before-close="handleCancel">
|
:dialogTitle="addOrEditTitle"
|
||||||
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList"
|
:dialogVisible="centervisible"
|
||||||
@successSubmit="successSubmit" />
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
>
|
||||||
|
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList" @successSubmit="successSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -44,7 +68,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '能源表名',
|
label: '水/气表名',
|
||||||
filter: publicFormatter('table_name'),
|
filter: publicFormatter('table_name'),
|
||||||
minWidth: 110
|
minWidth: 110
|
||||||
},
|
},
|
||||||
@ -118,25 +142,25 @@ export default {
|
|||||||
// 班次基础信息列表
|
// 班次基础信息列表
|
||||||
list: [],
|
list: [],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
||||||
? {
|
? {
|
||||||
type: 'meterReading',
|
type: 'meterReading',
|
||||||
btnName: '抄表'
|
btnName: '抄表'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑'
|
btnName: '编辑'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除'
|
btnName: '删除'
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
].filter((v) => v),
|
].filter((v)=>v),
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -185,10 +209,10 @@ export default {
|
|||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.$modal.confirm('是否确认导出').then(() => {
|
this.$modal.confirm('是否确认导出').then(() => {
|
||||||
return energyQuantityManualExport({ ...this.queryParams });
|
return energyQuantityManualExport({...this.queryParams});
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$download.excel(response, '能源报表.xls');
|
this.$download.excel(response, '能源报表.xls');
|
||||||
}).catch(() => { })
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@ -257,13 +281,13 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
console.log(row.id)
|
console.log(row.id)
|
||||||
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function() {
|
||||||
return energyQuantityManualDelete({ id: row.id });
|
return energyQuantityManualDelete({id: row.id});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => { });
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)" :key="item.value" :label="item.label"
|
<el-option
|
||||||
|
v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -25,9 +28,9 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计价方式" prop="pricingMethod">
|
<el-form-item label="计价方式" prop="pricingMethod">
|
||||||
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="时间段" :value='0'></el-option>
|
<el-option label="时间段" :value= '0' ></el-option>
|
||||||
<el-option label="使用量" :value='1'></el-option>
|
<el-option label="使用量" :value= '1' ></el-option>
|
||||||
<el-option label="固定价位" :value='2'></el-option>
|
<el-option label="固定价位" :value= '2' ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -35,33 +38,56 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 2">
|
<el-col :span="12" v-show="form.pricingMethod === 2">
|
||||||
<el-form-item label="单价(元)" prop="pricingMethod">
|
<el-form-item label="单价(元)" prop="pricingMethod">
|
||||||
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999"
|
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999" style="width: 100%;"></el-input-number>
|
||||||
style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 1">
|
<el-col :span="12" v-show="form.pricingMethod === 1">
|
||||||
<el-form-item label="计量维度" prop="dim">
|
<el-form-item label="计量维度" prop="dim">
|
||||||
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="月" :value='4'></el-option>
|
<el-option label="月" :value= '4' ></el-option>
|
||||||
<el-option label="年" :value='5'></el-option>
|
<el-option label="年" :value= '5' ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 0">
|
<el-col :span="24" v-show="form.pricingMethod === 0">
|
||||||
<el-form-item label="时间段" prop="pricingMethod">
|
<el-form-item label="时间段" prop="pricingMethod">
|
||||||
<base-table :key='timeKye' :table-props="tableProps1" :table-data="tableData1"
|
<base-table
|
||||||
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick1" @emitFun="inputChange1">
|
:key='timeKye'
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
:table-props="tableProps1"
|
||||||
@clickBtn="handleClick1" />
|
:table-data="tableData1"
|
||||||
|
:add-button-show="addButtonShow"
|
||||||
|
@emitButtonClick="emitButtonClick1"
|
||||||
|
@emitFun="inputChange1"
|
||||||
|
>
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="80"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick1"
|
||||||
|
/>
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 1">
|
<el-col :span="24" v-show="form.pricingMethod === 1">
|
||||||
<el-form-item label="使用量" prop="pricingMethod">
|
<el-form-item label="使用量" prop="pricingMethod">
|
||||||
<base-table :key='usedKye' :table-props="tableProps2" :table-data="tableData2"
|
<base-table
|
||||||
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick2" @emitFun="inputChange2">
|
:key='usedKye'
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
:table-props="tableProps2"
|
||||||
@clickBtn="handleClick2" />
|
:table-data="tableData2"
|
||||||
|
:add-button-show="addButtonShow"
|
||||||
|
@emitButtonClick="emitButtonClick2"
|
||||||
|
@emitFun="inputChange2"
|
||||||
|
>
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="80"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick2"
|
||||||
|
/>
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -156,15 +182,15 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = id
|
this.form.id = id
|
||||||
getEnergyType(id).then((res) => {
|
getEnergyType( id ).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.name = res.data.name
|
this.form.name = res.data.name
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.unit = res.data.unit
|
this.form.unit = res.data.unit
|
||||||
this.form.pricingMethod = res.data.pricingMethod
|
this.form.pricingMethod = res.data.pricingMethod
|
||||||
this.form.leaderName = res.data.leaderName
|
this.form.leaderName = res.data.leaderName
|
||||||
this.form.push = res.data.push ? true : false
|
this.form.push = res.data.push ? true : false
|
||||||
switch (this.form.pricingMethod) {
|
switch(this.form.pricingMethod) {
|
||||||
case 0:
|
case 0:
|
||||||
this.tableData1 = res.data.segPriceList || []
|
this.tableData1 = res.data.segPriceList || []
|
||||||
break;
|
break;
|
||||||
@ -172,7 +198,6 @@ export default {
|
|||||||
this.tableData2 = res.data.usedPriceList || []
|
this.tableData2 = res.data.usedPriceList || []
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.form.singlePrice = res.data.singlePrice || 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -209,7 +234,7 @@ export default {
|
|||||||
emitButtonClick1() {
|
emitButtonClick1() {
|
||||||
let n = this.tableData1.length
|
let n = this.tableData1.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startTime = n === 0 ? '' : this.tableData1[n - 1].endTime
|
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
||||||
obj.endTime = ''
|
obj.endTime = ''
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData1.push(obj)
|
this.tableData1.push(obj)
|
||||||
@ -217,7 +242,7 @@ export default {
|
|||||||
emitButtonClick2() {
|
emitButtonClick2() {
|
||||||
let n = this.tableData2.length
|
let n = this.tableData2.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startUsed = n === 0 ? 0 : this.tableData2[n - 1].endUsed
|
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
||||||
obj.endUsed = 0
|
obj.endUsed = 0
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData2.push(obj)
|
this.tableData2.push(obj)
|
||||||
@ -234,7 +259,7 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
switch (this.form.pricingMethod) {
|
switch(this.form.pricingMethod) {
|
||||||
case 0:// 时间段
|
case 0:// 时间段
|
||||||
if (this.tableData1.length === 0) {
|
if (this.tableData1.length === 0) {
|
||||||
this.$modal.msgError('时间段表格数据不能为空')
|
this.$modal.msgError('时间段表格数据不能为空')
|
||||||
@ -264,7 +289,7 @@ export default {
|
|||||||
default:// 固定单价
|
default:// 固定单价
|
||||||
if (!this.form.singlePrice) {
|
if (!this.form.singlePrice) {
|
||||||
this.$modal.msgError('单价有误请检查,请检查')
|
this.$modal.msgError('单价有误请检查,请检查')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
@ -277,11 +302,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
||||||
push: this.form.push ? 1 : 0
|
push:this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -295,11 +320,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
||||||
push: this.form.push ? 1 : 0
|
push:this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="报警级别"
|
label="报警级别"
|
||||||
prop="grade"
|
prop="grade"
|
||||||
:rules="[{ required: false, message: '报警级别不能为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="dataForm.grade"
|
v-model="dataForm.grade"
|
||||||
|
@ -7,11 +7,10 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="true"
|
:wrapper-closable="false"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
:before-close="beforeClose"
|
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@closed="$emit('destroy')">
|
@closed="$emit('destroy')">
|
||||||
@ -44,51 +43,7 @@
|
|||||||
:rows="formRows" /> -->
|
:rows="formRows" /> -->
|
||||||
|
|
||||||
<!-- <el-row v-if="mode.includes('detail')" style="margin-bottom: 24px"> -->
|
<!-- <el-row v-if="mode.includes('detail')" style="margin-bottom: 24px"> -->
|
||||||
<el-form
|
<el-row style="margin-bottom: 24px">
|
||||||
ref="form"
|
|
||||||
:model="dataForm"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="设备"
|
|
||||||
prop="equipmentId"
|
|
||||||
:rules="[{ required: true, message: '设备不能为空', trigger: 'change' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="isdetail"
|
|
||||||
v-model="dataForm.equipmentId"
|
|
||||||
placeholder="请选择设备"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in equipmentList"
|
|
||||||
:key="opt.id"
|
|
||||||
:label="opt.name"
|
|
||||||
:value="opt.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="报警分组"
|
|
||||||
prop="groupId"
|
|
||||||
:rules="[{ required: true, message: '报警分组不能为空', trigger: 'change' }]">
|
|
||||||
<el-select
|
|
||||||
:disabled="isdetail"
|
|
||||||
v-model="dataForm.groupId"
|
|
||||||
placeholder="请选择报警分组"
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in grouList"
|
|
||||||
:key="opt.id"
|
|
||||||
:label="opt.name"
|
|
||||||
:value="opt.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<!-- <el-row style="margin-bottom: 24px">
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div
|
<div
|
||||||
class="title"
|
class="title"
|
||||||
@ -107,7 +62,7 @@
|
|||||||
{{ form.code }}
|
{{ form.code }}
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row> -->
|
</el-row>
|
||||||
<!-- <el-row v-else style="margin-bottom: 24px" :gutter="20">
|
<!-- <el-row v-else style="margin-bottom: 24px" :gutter="20">
|
||||||
<el-form ref="form" :model="form">
|
<el-form ref="form" :model="form">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -173,11 +128,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleSave">
|
v-if="!mode.includes('detail')"
|
||||||
|
@click="handleCancel">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -207,8 +163,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import BaseInfoForm from '@/components/DialogForm';
|
import BaseInfoForm from '@/components/DialogForm';
|
||||||
import DialogForm from './dialogForm';
|
import DialogForm from './dialogForm';
|
||||||
import { getEquipmentList, getgroupAllList } from '@/api/equipment/base/config/config'
|
|
||||||
import { updateEquipmentBindGroup } from '@/api/base/equipmentBindGroup';
|
|
||||||
|
|
||||||
const SmallTitle = {
|
const SmallTitle = {
|
||||||
name: 'SmallTitle',
|
name: 'SmallTitle',
|
||||||
@ -237,21 +191,16 @@ const SmallTitle = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SmallTitle, DialogForm, BaseInfoForm },
|
components: { SmallTitle, DialogForm, BaseInfoForm },
|
||||||
props: ['sections', 'defaultMode', 'dataId', 'size', 'equipmentId', 'id'], // dataId 作为一个通用的存放id的字段
|
props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId 作为一个通用的存放id的字段
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mode: '',
|
mode: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
showForm: false,
|
showForm: false,
|
||||||
isdetail: false,
|
|
||||||
formLoading: false,
|
|
||||||
grouList: [],
|
|
||||||
equipmentList: [],
|
|
||||||
total: 0,
|
total: 0,
|
||||||
form: {},
|
form: {},
|
||||||
list: [],
|
list: [],
|
||||||
attrTitle: '',
|
attrTitle: '',
|
||||||
dataForm: {},
|
|
||||||
attrForm: {
|
attrForm: {
|
||||||
id: null,
|
id: null,
|
||||||
equipmentGroupId: '',
|
equipmentGroupId: '',
|
||||||
@ -376,34 +325,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// handleSave() {
|
|
||||||
// updateEquipmentBindGroup(this.form).then((response) => {
|
|
||||||
// this.$modal.msgSuccess('修改成功');
|
|
||||||
// this.open = false;
|
|
||||||
// this.getList();
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
async getDict() {
|
|
||||||
const res = await getEquipmentList({
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 100,
|
|
||||||
special: false
|
|
||||||
})
|
|
||||||
this.equipmentList = res.data.list
|
|
||||||
const groupRes = await getgroupAllList()
|
|
||||||
this.grouList = groupRes.data
|
|
||||||
},
|
|
||||||
beforeClose(done) {
|
|
||||||
if (this.mode.includes('edit')) {
|
|
||||||
this.$confirm('确认关闭?')
|
|
||||||
.then(_ => {
|
|
||||||
done();
|
|
||||||
})
|
|
||||||
.catch(_ => {});
|
|
||||||
} else {
|
|
||||||
done()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleTableBtnClick({ type, data }) {
|
handleTableBtnClick({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
@ -421,16 +342,6 @@ export default {
|
|||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
// 设备分组传值
|
|
||||||
// this.dataForm = {
|
|
||||||
// equipmentId: this.equipmentId,
|
|
||||||
// groupId: this.dataId
|
|
||||||
// }
|
|
||||||
this.getDict()
|
|
||||||
this.$set(this.dataForm, 'equipmentId', this.equipmentId)
|
|
||||||
this.$set(this.dataForm, 'groupId', this.dataId)
|
|
||||||
this.$set(this.dataForm, 'id', this.id)
|
|
||||||
this.isdetail = this.mode === 'detail' ? true : false
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async getAttrList() {
|
async getAttrList() {
|
||||||
@ -449,9 +360,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const isEdit = !this.mode.includes('detail');
|
const isEdit = !this.mode.includes('detail');
|
||||||
await this.$axios({
|
await this.$axios({
|
||||||
url: '/base/equipment-bind-group/update',
|
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
||||||
method: isEdit ? 'put' : 'post',
|
method: isEdit ? 'put' : 'post',
|
||||||
data: this.dataForm,
|
data: this.form,
|
||||||
});
|
});
|
||||||
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
size="45%"
|
size="45%"
|
||||||
:default-mode="editMode"
|
:default-mode="editMode"
|
||||||
:data-id="alarmForm.id"
|
:data-id="alarmForm.id"
|
||||||
:equipment-id="equipmentId"
|
|
||||||
:id="id"
|
|
||||||
:sections="[
|
:sections="[
|
||||||
{
|
{
|
||||||
name: '基本信息',
|
name: '基本信息',
|
||||||
@ -222,7 +220,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备',
|
label: '设备',
|
||||||
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
|
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
|
||||||
prop: 'equipmentId',
|
prop: 'equipmentId',
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@ -268,8 +266,6 @@ export default {
|
|||||||
equipmentGroupCode: undefined,
|
equipmentGroupCode: undefined,
|
||||||
equipmentGroupName: undefined,
|
equipmentGroupName: undefined,
|
||||||
},
|
},
|
||||||
equipmentId: undefined,
|
|
||||||
id: undefined,
|
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
editMode: '',
|
editMode: '',
|
||||||
drawerBaseInfoRows: [
|
drawerBaseInfoRows: [
|
||||||
@ -444,8 +440,6 @@ export default {
|
|||||||
this.alarmForm.id = groupId;
|
this.alarmForm.id = groupId;
|
||||||
this.alarmForm.equipmentGroupCode = groupCode;
|
this.alarmForm.equipmentGroupCode = groupCode;
|
||||||
this.alarmForm.equipmentGroupName = groupName;
|
this.alarmForm.equipmentGroupName = groupName;
|
||||||
this.equipmentId = equipmentId;
|
|
||||||
this.id = id;
|
|
||||||
this.editVisible = true;
|
this.editVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['drawer'].init();
|
this.$refs['drawer'].init();
|
||||||
|
@ -379,7 +379,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
|
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.code,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -463,8 +463,7 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '添加设备采集配置';
|
this.title = '添加设备与实时采集关系表(一对多)';
|
||||||
this.$refs.addOrUpdate.init()
|
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
@ -473,7 +472,7 @@ export default {
|
|||||||
getEquipmentPlcConnect(id).then((response) => {
|
getEquipmentPlcConnect(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改设备采集配置';
|
this.title = '修改设备与实时采集关系表(一对多)';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 16:47:02
|
* @LastEditTime: 2024-02-22 10:08:13
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -39,9 +39,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../../../core/mixins/basic-add';
|
import basicAdd from '../../../../core/mixins/basic-add';
|
||||||
import { createCorePL, updateCorePL, getCorePL, getCode } from "@/api/base/coreProductionLine";
|
import { createCorePL, updateCorePL, getCorePL, getCode, getCorePLList } from "@/api/base/coreProductionLine";
|
||||||
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
|
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
|
||||||
import { getplcAllList, getTree } from "@/api/equipment/base/config/config";
|
import { getplcAllList, listByParentId } from "@/api/equipment/base/config/config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
@ -95,29 +95,22 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['dataForm'].resetFields()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 关联表名列表
|
// 关联表名列表
|
||||||
const res = await getplcAllList();
|
const res = await getplcAllList();
|
||||||
this.plcList = res.data;
|
this.plcList = res.data;
|
||||||
// 树形结构
|
// 产线列表
|
||||||
const res1 = await getTree();
|
const res1 = await getCorePLList();
|
||||||
this.plLineList = res1.data;
|
this.plLineList = res1.data;
|
||||||
// const res1 = await getCorePLList();
|
this.plLineList.forEach(item => {
|
||||||
// this.plLineList = res1.data;
|
listByParentId({ id: item.id }).then(resp => {
|
||||||
// this.plLineList.forEach(item => {
|
if (resp.data.length > 0) {
|
||||||
// listByParentId({ id: item.id }).then(resp => {
|
// item.children = resp.data
|
||||||
// if (resp.data.length > 0) {
|
this.$set(item, 'children', resp.data)
|
||||||
// // item.children = resp.data
|
// this.$forceUpdate()
|
||||||
// this.$set(item, 'children', resp.data)
|
}
|
||||||
// // this.$forceUpdate()
|
})
|
||||||
// }
|
})
|
||||||
// })
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
|
@ -98,12 +98,12 @@ export default {
|
|||||||
addContent: false,
|
addContent: false,
|
||||||
searchBarKeys: ['name', 'actualCheckTime'],
|
searchBarKeys: ['name', 'actualCheckTime'],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('equipment:check-record:detail')
|
// this.$auth.hasPermi('equipment:check-record:detail')
|
||||||
? {
|
// ? {
|
||||||
type: 'detail',
|
// type: 'detail',
|
||||||
btnName: '详情',
|
// btnName: '详情',
|
||||||
}
|
// }
|
||||||
: undefined,
|
// : undefined,
|
||||||
// this.$auth.hasPermi('equipment:check-record:update')
|
// this.$auth.hasPermi('equipment:check-record:update')
|
||||||
// ? {
|
// ? {
|
||||||
// type: 'edit',
|
// type: 'edit',
|
||||||
@ -122,7 +122,7 @@ export default {
|
|||||||
{ prop: 'department', label: '部门' },
|
{ prop: 'department', label: '部门' },
|
||||||
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
|
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
|
||||||
{ prop: 'groupClass', label: '班次' },
|
{ prop: 'groupClass', label: '班次' },
|
||||||
// { prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn },
|
{ prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn },
|
||||||
{ prop: 'remark', label: '备注' }
|
{ prop: 'remark', label: '备注' }
|
||||||
// { prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] },
|
// { prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] },
|
||||||
// { prop: 'sectionName', label: '计划巡检时间' },
|
// { prop: 'sectionName', label: '计划巡检时间' },
|
||||||
@ -416,14 +416,10 @@ export default {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
handleDetail({ id }) {
|
handleDetail({ id }) {
|
||||||
this.addContent = true;
|
this.addOrUpdateVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addContent.init(id, true);
|
this.$refs.addOrUpdate.init(id, true);
|
||||||
});
|
});
|
||||||
// this.addOrUpdateVisible = true
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.$refs.addOrUpdate.init(id, true);
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
@ -73,7 +73,7 @@ const remainBox = {
|
|||||||
color() {
|
color() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
const v = +this.value;
|
const v = +this.value;
|
||||||
return v <= 1 ? 'red' : v > 1 && v <= 2 ? 'yellow' : 'green';
|
return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
||||||
}
|
}
|
||||||
return 'unset';
|
return 'unset';
|
||||||
},
|
},
|
||||||
@ -84,10 +84,9 @@ const remainBox = {
|
|||||||
style={`background: ${
|
style={`background: ${
|
||||||
this.color
|
this.color
|
||||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||||
// this.color == 'red' ? '#fff' : 'unset'
|
this.color == 'red' ? '#fff' : 'unset'
|
||||||
'#fff'
|
|
||||||
}`}>
|
}`}>
|
||||||
{this.injectData[this.injectData.prop]?.toFixed(0) || ''}
|
{this.injectData[this.injectData.prop] || ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -129,26 +128,22 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: parseTime(createTime),
|
// filter: parseTime(createTime),
|
||||||
// },
|
// },
|
||||||
{ prop: 'code', label: '保养计划单号', minWidth: 118, showOverflowtooltip: true },
|
{ prop: 'code', label: '保养计划单号' },
|
||||||
{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true },
|
{ prop: 'name', label: '保养计划名称' },
|
||||||
{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true },
|
{ prop: 'departmentName', label: '部门' },
|
||||||
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
|
{ prop: 'lineName', label: '产线名' },
|
||||||
{
|
{
|
||||||
prop: 'lastPlanMaintainTime',
|
prop: 'lastPlanMaintainTime',
|
||||||
label: '上次计划保养时间',
|
label: '上次计划保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
minWidth: 160,
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lastMaintainTime',
|
prop: 'lastMaintainTime',
|
||||||
label: '上次实际保养时间',
|
label: '上次实际保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
minWidth: 160,
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
},
|
||||||
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime, minWidth: 160, showOverflowtooltip: true },
|
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
|
||||||
{ prop: 'maintainer', label: '计划保养人员', minWidth: 160, showOverflowtooltip: true },
|
{ prop: 'maintainer', label: '计划保养人员' },
|
||||||
// { prop: 'equipmentName', label: '设备名称' },
|
// { prop: 'equipmentName', label: '设备名称' },
|
||||||
// { prop: 'equipmentCode', label: '设备编码' },
|
// { prop: 'equipmentCode', label: '设备编码' },
|
||||||
// { prop: 'maintenancePeriod', label: '保养频率' },
|
// { prop: 'maintenancePeriod', label: '保养频率' },
|
||||||
@ -158,12 +153,11 @@ export default {
|
|||||||
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
// filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||||
// },
|
// },
|
||||||
// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
||||||
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 },
|
{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn },
|
||||||
{
|
{
|
||||||
prop: 'remainDays',
|
prop: 'remainDays',
|
||||||
label: '距离下次保养剩余时间(天)',
|
label: '距离下次保养剩余时间(天)',
|
||||||
subcomponent: remainBox,
|
subcomponent: remainBox,
|
||||||
minWidth: 210,
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
@ -238,24 +232,23 @@ export default {
|
|||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
},
|
},
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
// this.http('/base/core-equipment/page', 'get', {
|
this.http('/base/core-equipment/page', 'get', {
|
||||||
// special: false,
|
special: false,
|
||||||
// pageNo: 1,
|
pageNo: 1,
|
||||||
// pageSize: 99
|
pageSize: 99
|
||||||
// }).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
// this.$set(
|
this.$set(
|
||||||
// this.searchBarFormConfig[1],
|
this.searchBarFormConfig[1],
|
||||||
// 'selectOptions',
|
'selectOptions',
|
||||||
// (data?.list || []).map((item) => ({
|
(data?.list || []).map((item) => ({
|
||||||
// name: item.name,
|
name: item.name,
|
||||||
// id: item.id,
|
id: item.id,
|
||||||
// }))
|
}))
|
||||||
// );
|
);
|
||||||
// });
|
});
|
||||||
this.http('/base/equipment-maintain-plan/page', 'get', {
|
this.http('/base/equipment-maintain-plan/page', 'get', {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
special: false
|
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
this.$set(
|
this.$set(
|
||||||
this.searchBarFormConfig[0],
|
this.searchBarFormConfig[0],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 15:55:36
|
* @LastEditTime: 2024-02-28 19:52:13
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="确认时限(h)" prop="confirmTimeLimit">
|
<el-form-item label="确认时限(h)" prop="confirmTimeLimit">
|
||||||
<el-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入确认时限" />
|
<el-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -64,7 +64,6 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
|
import { deleteEqMaintainLog, exportMaintainLogExcel } from '@/api/equipment/base/maintain/record';
|
||||||
import AddContent from './addContent.vue';
|
import AddContent from './addContent.vue';
|
||||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
|
||||||
|
|
||||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -175,7 +174,6 @@ export default {
|
|||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
defaultTime: ['00:00:00', '23:59:59'],
|
defaultTime: ['00:00:00', '23:59:59'],
|
||||||
param: 'startTime',
|
param: 'startTime',
|
||||||
defaultSelect: []
|
|
||||||
// width: 350,
|
// width: 350,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@ -351,28 +349,23 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
let end = moment().format('YYYY-MM-DD 08:00:00')
|
|
||||||
const current = new Date()
|
|
||||||
let start = parseTime(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 3, 8, 0, 0))
|
|
||||||
this.searchBarFormConfig[1].defaultSelect = [start, end]
|
|
||||||
this.queryParams.startTime = [start, end]
|
|
||||||
this.initSearchBar();
|
this.initSearchBar();
|
||||||
// if (this.$route.query) {
|
if (this.$route.query) {
|
||||||
// // this.queryParams.equipmentId =
|
// this.queryParams.equipmentId =
|
||||||
// // this.$route.query?.equipmentId ?? undefined;
|
// this.$route.query?.equipmentId ?? undefined;
|
||||||
// this.queryParams.maintainPlanId =
|
this.queryParams.maintainPlanId =
|
||||||
// this.$route.query?.maintainPlanId ?? undefined;
|
this.$route.query?.maintainPlanId ?? undefined;
|
||||||
// // this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
|
// this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
|
||||||
// this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
|
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
|
||||||
// // this.searchBarFormConfig[0].defaultSelect =
|
// this.searchBarFormConfig[0].defaultSelect =
|
||||||
// // this.$route.query.equipmentId ?? undefined;
|
// this.$route.query.equipmentId ?? undefined;
|
||||||
// this.searchBarFormConfig[0].defaultSelect =
|
this.searchBarFormConfig[0].defaultSelect =
|
||||||
// this.$route.query.maintainPlanId ?? undefined;
|
this.$route.query.maintainPlanId ?? undefined;
|
||||||
// this.searchBarFormConfig[1].defaultSelect =
|
this.searchBarFormConfig[1].defaultSelect =
|
||||||
// this.$route.query?.createTime ?? undefined;
|
this.$route.query?.createTime ?? undefined;
|
||||||
// // this.searchBarFormConfig[3].defaultSelect =
|
// this.searchBarFormConfig[3].defaultSelect =
|
||||||
// // Number(this.$route.query.relatePlan) ?? undefined;
|
// Number(this.$route.query.relatePlan) ?? undefined;
|
||||||
// }
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
if (this.$route.query.addRecord) {
|
if (this.$route.query.addRecord) {
|
||||||
this.handleAdd()
|
this.handleAdd()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :show-close='false'>
|
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-row class="topBox">
|
<el-row class="topBox">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
@ -5,10 +5,13 @@
|
|||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
||||||
@change="getWorkOrderMsg">
|
<el-option
|
||||||
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
v-for="item in workOrderList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -20,8 +23,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
||||||
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
|
v-for="item in productList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -35,28 +42,36 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="planStartTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
placeholder="选择日期"
|
||||||
|
:disabled="isBind">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="计划完成时间">
|
||||||
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker
|
||||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
v-model="planFinishTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
placeholder="选择日期"
|
||||||
|
:disabled="isBind">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
||||||
style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
||||||
style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -64,15 +79,18 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
||||||
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
|
v-for="item in processFlowList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind"
|
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind" @change='selectMethod'>
|
||||||
@change='selectMethod'>
|
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -81,7 +99,10 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
<el-option
|
||||||
|
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -90,7 +111,11 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
|
v-for="item in workOrderTypeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -98,39 +123,45 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
<el-form-item label="关联产线" prop="productLineId">
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
||||||
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option
|
||||||
</el-option>
|
v-for="item in productLineList"
|
||||||
</el-select>
|
:key="item.id"
|
||||||
</el-form-item>
|
:label="item.name"
|
||||||
</el-col>
|
:value="item.id">
|
||||||
<el-col :span='6'>
|
</el-option>
|
||||||
<el-form-item label="负责车间" prop="roomNameDict">
|
</el-select>
|
||||||
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
</el-form-item>
|
||||||
<el-option v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)" :key="item.value" :label="item.label"
|
</el-col>
|
||||||
:value="item.value">
|
<el-col :span='6'>
|
||||||
</el-option>
|
<el-form-item label="负责车间" prop="roomNameDict">
|
||||||
</el-select>
|
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
</el-form-item>
|
<el-option
|
||||||
</el-col>
|
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
|
||||||
<el-col :span='6'>
|
:key="item.value"
|
||||||
<el-form-item label="负责人" prop="workers">
|
:label="item.label"
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
:value="item.value">
|
||||||
</el-form-item>
|
</el-option>
|
||||||
</el-col>
|
</el-select>
|
||||||
<el-col :span='6'>
|
</el-form-item>
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
</el-col>
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999"
|
<el-col :span='6'>
|
||||||
style="width: 100%;"></el-input-number>
|
<el-form-item label="负责人" prop="workers">
|
||||||
</el-form-item>
|
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span='6'>
|
||||||
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
|
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, getFreeWOlist, getWorkOrderById } from '@/api/base/orderManage'
|
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
import { getLineAll } from '@/api/base/productionLine'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
@ -171,8 +202,8 @@ export default {
|
|||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
productLineList: [],
|
productLineList: [],
|
||||||
workOrderTypeList: [
|
workOrderTypeList: [
|
||||||
{ id: 1, name: '普通' },
|
{id: 1,name:'普通'},
|
||||||
{ id: 2, name: '特殊' }
|
{id: 2, name:'特殊'}
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
@ -192,7 +223,7 @@ export default {
|
|||||||
this.form.planProductId = data.planProductId
|
this.form.planProductId = data.planProductId
|
||||||
// this.form.processFlowId = data.processFlowId
|
// this.form.processFlowId = data.processFlowId
|
||||||
// this.form.materialMethod = data.materialMethod
|
// this.form.materialMethod = data.materialMethod
|
||||||
} else {//绑定
|
}else{//绑定
|
||||||
this.isBind = true
|
this.isBind = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -213,7 +244,7 @@ export default {
|
|||||||
this.processFlowList = res.data || []
|
this.processFlowList = res.data || []
|
||||||
})
|
})
|
||||||
// 工单list
|
// 工单list
|
||||||
getFreeWOlist({
|
workOrderList({
|
||||||
status: 1
|
status: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.workOrderList = res.data || []
|
this.workOrderList = res.data || []
|
||||||
@ -221,10 +252,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 物料变动
|
// 物料变动
|
||||||
selectMethod(val) {
|
selectMethod(val) {
|
||||||
if (val === 2 && !this.form.processFlowId) {
|
if (val === 2 && !this.form.processFlowId ) {
|
||||||
this.form.materialMethod = 1
|
this.form.materialMethod = 1
|
||||||
this.$modal.msgError("请先选择关联工艺");
|
this.$modal.msgError("请先选择关联工艺");
|
||||||
} else if (val === 1) {
|
}else if (val === 1) {
|
||||||
this.form.processFlowId = ''
|
this.form.processFlowId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -242,32 +273,32 @@ export default {
|
|||||||
workOrderId: this.form.workOrderId,
|
workOrderId: this.form.workOrderId,
|
||||||
orderId: this.form.orderId,
|
orderId: this.form.orderId,
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
planAssignmentQuantity: this.form.planAssignmentQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功")
|
this.$modal.msgSuccess("操作成功")
|
||||||
this.$emit('addWorkOrderSubmit')
|
this.$emit('addWorkOrderSubmit')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {// 新增工单
|
}else{// 新增工单
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 新增工单
|
// 新增工单
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
orderIssue({ ..._this.form }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
_this.$modal.msgSuccess("操作成功")
|
_this.$modal.msgSuccess("操作成功")
|
||||||
let name = this.form.name
|
let name = this.form.name
|
||||||
_this.$emit('addWorkOrderSubmit')
|
_this.$emit('addWorkOrderSubmit')
|
||||||
// // 询问是否添加预使用主原料
|
// // 询问是否添加预使用主原料
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||||
// _this.$router.push({
|
// _this.$router.push({
|
||||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -288,7 +319,7 @@ export default {
|
|||||||
// 绑定工单,选择工单时获取工单信息
|
// 绑定工单,选择工单时获取工单信息
|
||||||
getWorkOrderMsg() {
|
getWorkOrderMsg() {
|
||||||
if (this.form.workOrderId) {
|
if (this.form.workOrderId) {
|
||||||
getWorkOrderById({ id: this.form.workOrderId }).then(res => {
|
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.planProductId = res.data.planProductId
|
this.form.planProductId = res.data.planProductId
|
||||||
@ -314,7 +345,7 @@ export default {
|
|||||||
getSpecifications(val) {
|
getSpecifications(val) {
|
||||||
for (let i of this.productList) {
|
for (let i of this.productList) {
|
||||||
if (i.id === val) {
|
if (i.id === val) {
|
||||||
this.form.specifications = i.specifications
|
this.form.specifications = i.specifications
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-15 13:42:59
|
* @LastEditTime: 2024-03-14 13:46:39
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -39,13 +39,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" align="center">
|
<el-table-column label="规格" align="center">
|
||||||
<el-table-column label="成品" align="center">
|
<el-table-column label="成品" align="center">
|
||||||
<!-- <el-table-column :show-header="false"> -->
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionGlassSize" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionL" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionGlassSize }} </span>
|
<span v-else>{{ scope.row.productionL }} </span>
|
||||||
</template>
|
</template>
|
||||||
<!-- </el-table-column> -->
|
</el-table-column>
|
||||||
<!-- <el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionW }} </span>
|
<span v-else>{{ scope.row.productionW }} </span>
|
||||||
@ -56,16 +56,16 @@
|
|||||||
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionH }} </span>
|
<span v-else>{{ scope.row.productionH }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="originalGlassSize" label="原片" align="center">
|
<el-table-column label="原片" align="center">
|
||||||
<!-- <el-table-column prop="originalGlassSize"> -->
|
<el-table-column prop="originalGlassSize">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
||||||
</template>
|
</template>
|
||||||
<!-- </el-table-column> -->
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user