Merge branch 'projects/mes-test' of git.picaiba.com:mt-fe-group/yudao-dev into projects/mes-test

This commit is contained in:
gtz 2023-11-22 14:53:49 +08:00
commit de15716b7c
34 changed files with 314 additions and 121 deletions

View File

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-11-16 14:07:34
# @LastEditTime: 2023-11-21 10:36:47
# @LastEditors: DY
# @Description:
###
@ -19,7 +19,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# 积木报表指向地址

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-13 08:52:12
* @LastEditTime: 2023-11-20 16:38:18
* @LastEditors: DY
* @Description:
*/
@ -66,3 +66,11 @@ export function getcheckList(query) {
params: query
})
}
// 删除巡检内容
export function deleteCheck(id) {
return request({
url: '/base/equipment-check/delete?id=' + id,
method: 'delete'
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-16 20:22:12
* @LastEditTime: 2023-11-21 10:50:55
* @LastEditors: DY
* @Description:
*/
@ -14,3 +14,21 @@ export function deleteEqMaintainLog(id) {
method: 'delete'
})
}
// 删除设备保养计划配置
export function deleteEqMaintainPlan(id) {
return request({
url: '/base/equipment-maintain-plan/delete?id=' + id,
method: 'delete'
})
}
// 导出设备保养监控
export function exportMaintainMonitorExcel(query) {
return request({
url: '/base/equipment-maintain-plan/monitor-export',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -0,0 +1,16 @@
/*
* @Author: Do not edit
* @Date: 2023-11-22 13:59:17
* @LastEditTime: 2023-11-22 13:59:45
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 删除设备备品备件
export function deleteSparePart(id) {
return request({
url: '/base/equipment-spare-part/delete?id=' + id,
method: 'delete'
})
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 10:53:43
* @LastEditTime: 2023-11-22 10:27:50
* @Description:
-->
<template>
@ -77,8 +77,8 @@ export default {
remark: undefined
},
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }],
contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" },
@ -87,10 +87,12 @@ export default {
if (value) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
callback(new Error("手机号格式错误"));
} else {
callback();
}
} else {
callback();
}
callback();
}
}, trigger: "blur"
}
]

View File

@ -105,8 +105,8 @@ export default {
formConfig: [
{
type: 'input',
label: '名称',
placeholder: '专业',
label: '客户名称',
placeholder: '客户名称',
param: 'name',
},
{

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-02 14:16:30
* @LastEditTime: 2023-11-22 10:32:10
* @Description:
-->
<template>
@ -89,7 +89,6 @@ export default {
const menu = { id: 0, name: '总部门', children: [] };
menu.children = this.handleTree(this.departmentlList, "id")
this.menuOptions.push(menu)
console.log('你好', this.menuOptions)
},
/** 转换菜单数据结构 */
normalizer(node) {

View File

@ -134,6 +134,11 @@ export default {
// this.dataListLoading = false;
// });
// },
successSubmit() {
this.handleCancel()
this.getDataList()
this.$refs.addOrUpdate.getDict()
},
buttonClick(val) {
switch (val.btnName) {
case 'search':

View File

@ -123,7 +123,7 @@ export default {
},
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '设备编码' },
{ prop: 'equipmentType', label: '设备类型' },
{ prop: 'equipmentTypeName', label: '设备类型' },
{ prop: 'enName', label: '英文名称' },
{ prop: 'abbr', label: '缩写' },
// {
@ -256,11 +256,19 @@ export default {
datetime: true,
label: '生产日期',
prop: 'productionTime',
bind: {
format: 'yyyy-MM-dd',
clearable: true,
},
},
{
datetime: true,
label: '进厂日期',
prop: 'enterTime',
bind: {
format: 'yyyy-MM-dd',
clearable: true,
},
},
{
input: true,

View File

@ -91,15 +91,15 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '设备类型名称' },
{ prop: 'code', label: '检测类型编码' },
{ prop: 'name', label: '类型名称' },
{ prop: 'code', label: '类型编号' },
{ prop: 'remark', label: '备注' },
],
searchBarFormConfig: [
{
type: 'input',
label: '设备类型',
placeholder: '请输入设备类型名称',
placeholder: '设备类型',
param: 'name',
},
{
@ -133,18 +133,19 @@ export default {
[
{
input: true,
label: '设备类型名称',
label: '类型名称',
prop: 'name',
rules: [{ required: true, message: '设备类型名不能为空', trigger: 'blur' }],
rules: [{ required: true, message: '类型名不能为空', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
},
{
input: true,
label: '设备类型编码',
label: '类型编号',
prop: 'code',
url: '/base/core-equipment-type/getCode',
rules: [{ required: true, message: '类型编号不能为空', trigger: 'blur' }],
},
],
[
@ -174,7 +175,13 @@ export default {
name: '',
},
//
form: {},
form: {
code: undefined,
name: undefined,
id: undefined,
parentId: undefined,
remark: undefined
},
};
},
watch: {
@ -268,7 +275,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除设备类型"' + row.name + '"?')
.confirm('是否确认删除设备类型"' + row.name + '"的数据项?')
.then(function () {
return deleteEquipmentType(id);
})

View File

@ -97,8 +97,8 @@ export default {
formConfig: [
{
type: 'input',
label: '名称',
placeholder: '专业',
label: '专业名称',
placeholder: '专业名称',
param: 'name',
},
{

View File

@ -107,8 +107,8 @@ export default {
formConfig: [
{
type: 'input',
label: '工单名称',
placeholder: '工单名称',
label: '产品名称',
placeholder: '产品名称',
param: 'name'
},
{

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 19:28:06
* @LastEditTime: 2023-11-21 18:59:54
* @Description:
-->
<template>
@ -11,7 +11,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px">
label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
@ -30,7 +30,8 @@
<el-select
v-model="dataForm.factoryId"
filterable
placeholder="请选择工厂">
placeholder="请选择工厂"
style="width: 100%">
<el-option
v-for="dict in factoryList"
:key="dict.id"
@ -94,8 +95,8 @@ export default {
},
factoryList: [],
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }],
factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }]
}
};

View File

@ -71,6 +71,10 @@ const tableProps = [
label: '当前状态',
filter: codeFilter('lineStatus')
},
{
prop: 'tvalue',
label: '产线TT值(h)'
},
{
prop: 'description',
label: '描述'

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 11:00:47
* @LastEditTime: 2023-11-22 10:27:43
* @Description:
-->
<template>
@ -77,8 +77,8 @@ export default {
remark: undefined
},
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "供应商编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "供应商名称不能为空", trigger: "blur" }],
contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" },
@ -87,10 +87,12 @@ export default {
if (value) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
callback(new Error("手机号格式错误"));
} else {
callback();
}
} else {
callback();
}
callback();
}
}, trigger: "blur"
}
]
@ -98,6 +100,31 @@ export default {
};
},
mounted() {},
methods: {}
methods: {
//
dataFormSubmit() {
console.log('你好', this.dataForm)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
}
};
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 14:38:20
* @LastEditTime: 2023-11-20 16:51:24
* @Description:
-->
<template>
@ -95,7 +95,8 @@ const tableProps = [
},
{
prop: 'material',
label: '原料名称'
label: '原料名称',
filter: publicFormatter('material')
},
{
prop: 'origin',
@ -103,7 +104,7 @@ const tableProps = [
filter: (val) => ['', '内部', '采购'][val]
},
{
prop: 'supplierId',
prop: 'supplierName',
label: '供应商',
},
{
@ -195,7 +196,7 @@ export default {
...this.listQuery,
workOrderId: this.dataForm.id,
}).then((response) => {
this.materialList = response.data.list;
this.materialList = response.data.records;
this.listQuery.total = response.data.total;
});
},

View File

@ -26,8 +26,8 @@
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="产品规格" prop="productSpec">
<el-input v-model="dataForm.productSpec" disabled></el-input>
<el-form-item label="产品规格" prop="specifications">
<el-input v-model="dataForm.specifications" />
</el-form-item>
</el-col>
</el-row>
@ -35,9 +35,9 @@
<el-col :span='12'>
<el-form-item label="计划开始时间">
<el-date-picker
v-model="planStartTime"
v-model="dataForm.planStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp"
style="width: 100%;"
placeholder="选择日期">
</el-date-picker>
@ -46,9 +46,9 @@
<el-col :span='12'>
<el-form-item label="计划完成时间">
<el-date-picker
v-model="planFinishTime"
v-model="dataForm.planFinishTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value-format="timestamp"
style="width: 100%;"
placeholder="选择日期">
</el-date-picker>
@ -83,8 +83,8 @@
<el-col :span='12'>
<el-form-item label="物料计算方式" prop="materialMethod">
<el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
<el-radio :label="1">产品基础</el-radio>
<el-radio :label="2">工艺扩展</el-radio>
<el-radio :label="1">产品基础BOM</el-radio>
<el-radio :label="2">工艺扩展BOM</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -168,7 +168,7 @@ export default {
name: '',
code: '',
planProductId: '',
productSpec: '',
specifications: '',
planStartTime: '',
planFinishTime: '',
planAssignQuantity: 0,
@ -186,7 +186,7 @@ export default {
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
productLineIds: [{ required: true, message: "产品不能为空", trigger: "change" }]
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
},
productList: [],
processFlowList: [],
@ -232,6 +232,10 @@ export default {
if (this.dataForm.id) {
getCoreWO(id).then(response => {
this.dataForm = response.data;
if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority)
}
this.dataForm.priority
});
} else {
if (this.urlOptions.isGetCode) {
@ -264,7 +268,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit("refreshDataList", true);
console.log('121', this.dataForm.name)
this.$emit("refreshDataList", {
id: response.data,
name: this.dataForm.name
});
}).catch(() => {
this.$emit("refreshDataList");
});

View File

@ -62,7 +62,7 @@
<el-input
v-model="dataForm.batch"
clearable
placeholder="请输入规格" />
placeholder="请输入批次号" />
</el-form-item>
<el-form-item label="数量" prop="num">
<el-input-number
@ -143,13 +143,19 @@ export default {
},
init(id) {
this.dataForm.id = id || '';
console.log('1', this.dataForm.id)
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getCoreWOMa(this.dataForm.id).then((res) => {
this.dataForm = res.data
if (this.dataForm.unit !== undefined) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.material !== undefined) {
this.dataForm.material = String(this.dataForm.material)
}
console.log('111', this.dataForm)
});
}
});

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-16 13:45:13
* @LastEditTime: 2023-11-22 09:47:53
* @Description:
-->
<template>
@ -16,6 +16,7 @@
<!-- <small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> -->
<el-button style="float: right" type="primary" @click="goback()">返回</el-button>
<div v-show="workOrderButton.length">
<el-button v-for="(work, index) in workOrderButton" :key="index" type="primary" @click="init(work.id, true)">{{ work.name }}</el-button>
</div>
@ -33,7 +34,7 @@
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col>
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</el-col>
<el-col :span="8">所属订单:
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px">{{ item.name }}</span>
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
</el-col>
</el-row>
<el-row :gutter="20">
@ -42,7 +43,7 @@
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">预计用时(小时):{{ dataForm.expectedTime }}</el-col>
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col>
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col>
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col>
</el-row>
@ -63,9 +64,7 @@
</small-title>
<div class="formContent">
<el-row :gutter="20">
<el-col :span="8">订单创建时间:
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px; white-space: pre-wrap">{{ parseTime(item.createTime) }}</span>
</el-col>
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col>
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col>
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col>
</el-row>
@ -143,7 +142,7 @@
<script>
// import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import { orderList } from "@/api/base/orderManage";
// import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle';
import { publicFormatter } from "@/utils/dict";
@ -186,7 +185,7 @@ const tableProps = [
const tableProps1 = [
{
prop: 'materialName',
label: '料名称'
label: '料名称'
},
{
prop: 'unit',
@ -223,7 +222,7 @@ export default {
dataForm: {},
orderList: [],
materialList: [],
orderArray: [],
// orderArray: [],
visible: false,
isdetail: false,
workOrderButton: [],
@ -336,12 +335,11 @@ export default {
});
}
//
orderList({
workOrderId: this.dataForm.id
}).then((response) => {
this.orderArray = response.data;
// this.listQuery.total = response.data.total;
});
// orderList({
// workOrderId: this.dataForm.id
// }).then((response) => {
// this.orderArray = response.data;
// });
},
init(id, isdetail) {
this.initData();
@ -374,8 +372,7 @@ export default {
});
},
goback() {
this.visible = false;
this.$emit('refreshDataList');
this.$router.go(-1);
// this.initData();
},
goEdit() {

View File

@ -213,7 +213,7 @@ export default {
{
name: 'status',
type: 'equal',
value: 3
value: 2
},
{
name: 'status',
@ -313,7 +313,15 @@ export default {
refreshWorkOrder(val) {
console.log(val)
if (val) {
console.log('打印')
// 使
console.log('预使用原料信息')
this.handleCancel()
this.getDataList()
this.materialVisible = true;
this.addOrEditTitle = "预使用主原料信息";
this.$nextTick(() => {
this.$refs.material.init(val, true);
});
} else {
this.successSubmit()
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 11:01:24
* @LastEditTime: 2023-11-22 10:26:58
* @Description:
-->
<template>
@ -211,10 +211,12 @@ export default {
if (value) {
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
callback(new Error("手机号格式错误"));
} else {
callback();
}
} else {
callback();
}
callback();
}
}, trigger: "blur"
}
],
@ -243,13 +245,32 @@ export default {
setOut(val) {
if (val === 1) {
this.isOut = true
this.dataForm.outTime = ''
} else {
this.isOut = false
}
},
reset() {
this.dataForm = {
id: undefined,
code: undefined,
name: undefined,
fileUrl: undefined,
sex: 0,
telephone: undefined,
departmentId: undefined,
position: undefined,
entryTime: new Date().getTime(),
status: 1,
outTime: undefined,
education: undefined,
workCost: undefined,
remark: undefined
}
this.majorIdList = undefined
},
//
dataFormSubmit() {
console.log('111', this.dataForm)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
@ -292,7 +313,8 @@ export default {
});
},
init(id) {
this.dataForm.id = id || "";
this.reset()
this.dataForm.id = id || undefined;
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-03 19:31:25
* @LastEditTime: 2023-11-22 08:55:37
* @Description:
-->
<template>
@ -82,8 +82,8 @@ export default {
},
proLineList: [],
dataRule: {
code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "工段编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "工段名称不能为空", trigger: "blur" }],
productionLineId: [{ required: true, message: "产线不能为空", trigger: "blur" }],
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }]
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 19:44:24
* @LastEditTime: 2023-11-22 11:22:38
* @Description:
-->
<template>
@ -127,12 +127,17 @@
物料属性
</small-title>
<div v-if="!isdetail" class="action_btn">
<template>
<span style="display: inline-block;">
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
</span>
</template>
</div>
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:add-button-show="isdetail ? null : '添加属性'"
@emitButtonClick="addNew()"
:table-data="materialAttrList">
<method-btn
v-if="!isdetail"
@ -152,11 +157,11 @@
</div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
<el-button style="" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
</el-button> -->
<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -425,4 +430,12 @@ export default {
justify-content: flex-end;
padding: 18px;
}
.action_btn {
float: right;
margin: -35px 15px;
font-size: 14px;
}
.add {
color: #0b58ff;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 20:04:03
* @LastEditTime: 2023-11-22 11:09:44
* @Description:
-->
<template>
@ -44,7 +44,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="产品BOM编码" prop="code">
<el-input v-model="dataForm.code" disabled placeholder="请输入产品Bom编码" />
<el-input v-model="dataForm.code" :disabled="isdetail" placeholder="请输入产品Bom编码" />
</el-form-item>
</el-col>
</el-row>
@ -154,11 +154,11 @@
</div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button v-if="isdetail" type="primary" @click="goEdit()">
<el-button style="" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
</el-button> -->
<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -304,15 +304,16 @@ export default {
}
return row.materialId === item.id
})
this.unitList.filter(u => {
if (tempM[0].unit === u.value) {
row.unit = u.value
row.mUnit = u.label
}
})
if (tempM[0].unit) {
this.unitList.filter(u => {
if (tempM[0].unit === u.value) {
row.unit = u.value
row.mUnit = u.label
}
})
}
// row.materialCode = tempList[0].code
// row.unit = tempList[0].unit
console.log('row', row)
},
edit(row) {
row.isEdit = true

View File

@ -151,7 +151,7 @@ export default {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.name = val.name ? val.name : undefined;
this.listQuery.productName = val.name ? val.name : undefined;
this.getDataList();
break;
case 'reset':

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-06 19:27:57
* @LastEditTime: 2023-11-22 10:40:08
* @Description:
-->
<template>
@ -151,7 +151,7 @@ export default {
equipmentId: undefined,
userName: undefined,
userNames: [],
useTime: undefined,
useTime: new Date().getTime(),
address: undefined,
num: 0,
source: undefined,

View File

@ -130,7 +130,7 @@ export default {
type: 'datePicker',
label: '使用时间段',
dateType: 'datetimerange',
format: 'yyyy-MM-dd',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',

View File

@ -52,6 +52,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { publicFormatter } from '@/utils/dict';
import { deleteCheck } from "@/api/equipment/base/inspection/settings";
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -163,7 +164,12 @@ export default {
content: null,
},
//
form: {},
form: {
code: '',
program: '',
id: undefined,
content: ''
},
basePath: '/base/equipment-check',
mode: null,
};
@ -224,7 +230,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
// this.reset();
this.open = true;
this.title = '添加巡检内容';
},
@ -265,9 +271,10 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除记录"' + row.name + '"?')
.confirm('是否确认删除巡检项目名称为"' + row.program + '"的数据项?')
.then(function () {
return this.delete({ id });
// return this.delete({ id });
return deleteCheck(id)
})
.then(() => {
this.getList();

View File

@ -103,8 +103,7 @@ export default {
{ prop: 'equipmentName', label: '设备' },
{ prop: 'responsible', label: '负责人' },
{ prop: 'equipmentCode', label: '描述' },
{ prop: 'checkNumber', label: '巡检条数' }, // TODO:
{ prop: 'remark', label: '备注' },
{ prop: 'checkNumber', label: '巡检条数' } // TODO:
],
searchBarFormConfig: [
{

View File

@ -51,6 +51,7 @@
import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
const remainBox = {
name: 'RemainBox',
@ -124,7 +125,7 @@ export default {
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'equipmentCode', label: '设备编码' },
{ prop: 'maintainDuration', label: '保养频率' },
{ prop: 'maintenancePeriod', label: '保养频率' },
{
prop: 'maintainType',
label: '保养类型',
@ -195,6 +196,24 @@ export default {
this.getList();
},
methods: {
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有设备保养监控数据项?')
.then(() => {
this.exportLoading = true;
return exportMaintainMonitorExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备保养监控.xls');
this.exportLoading = false;
})
.catch(() => { });
},
initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
this.$set(

View File

@ -50,6 +50,7 @@
<script>
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record'
export default {
name: 'PlanConfig',
@ -88,7 +89,7 @@ export default {
},
{ prop: 'name', label: '计划名称' },
{ prop: 'code', label: '计划编号' },
{ prop: 'enabled', label: '启用状态' },
{ prop: 'enabled', label: '启用状态', filter: (val) => ['停用', '启用'][val] },
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称' },
@ -220,6 +221,7 @@ export default {
transform: (val) => Number(val),
},
],
rules: [{ required: true, message: '保养频率不能为空', trigger: 'blur' }],
},
],
[{ input: true, label: '备注', prop: 'remark' }],
@ -344,9 +346,9 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除设备类型"' + row.name + '"?')
.confirm('是否确认删除计划名称为"' + row.name + '"的数据项?')
.then(function () {
return this.del(id);
return deleteEqMaintainPlan(id);
})
.then(() => {
this.getList();

View File

@ -440,9 +440,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm(
'是否删除设备保养单号为"' + row.maintainOrderNumber + '"的数据项?'
)
.confirm('是否删除设备名称为"' + row.equipmentName + '"的数据项?')
.then(function () {
return deleteEqMaintainLog(id);
})

View File

@ -112,7 +112,7 @@ export default {
{
prop: 'maintenanceStatus',
label: '维修状态',
filter: (v) => (v != null ? ['未完成', '完成'][v] : ''),
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
},
{ prop: 'maintenanceDuration', label: '维修时长(h)' },
{ prop: 'lineName', label: '产线' },
@ -138,8 +138,23 @@ export default {
selectOptions: [
{ name: '未完成', id: '0' },
{ name: '完成', id: '1' },
{ name: '进行中', id: '2' },
],
},
//
{
type: 'datePicker',
label: '时间段',
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'createTime'
},
{
type: 'button',
btnName: '查询',

View File

@ -52,6 +52,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { publicFormatter } from '@/utils/dict';
import { deleteSparePart } from '@/api/equipment/base/spare-parts/list'
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -131,6 +132,7 @@ export default {
input: true,
label: '备件名称',
prop: 'name',
rules: [{ required: true, message: '备件名称不能为空', trigger: 'blur' }],
},
{
input: true,
@ -313,9 +315,9 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除记录"' + row.name + '"?')
.confirm('是否确认删除备件名称为"' + row.name + '"的数据项?')
.then(function () {
return this.delete({ id });
return deleteSparePart(id);
})
.then(() => {
this.getList();