projects/mesxc-zhp #161

Closed
zhp wants to merge 119 commits from projects/mesxc-zhp into projects/mes-test
34 changed files with 314 additions and 121 deletions
Showing only changes of commit de15716b7c - Show all commits

View File

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

View File

@ -1,7 +1,7 @@
/* /*
* @Author: Do not edit * @Author: Do not edit
* @Date: 2023-11-08 15:56:52 * @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-13 08:52:12 * @LastEditTime: 2023-11-20 16:38:18
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -66,3 +66,11 @@ export function getcheckList(query) {
params: 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 * @Author: Do not edit
* @Date: 2023-11-08 15:56:52 * @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-16 20:22:12 * @LastEditTime: 2023-11-21 10:50:55
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -14,3 +14,21 @@ export function deleteEqMaintainLog(id) {
method: 'delete' 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 * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: DY * @LastEditors: DY
* @LastEditTime: 2023-11-03 10:53:43 * @LastEditTime: 2023-11-22 10:27:50
* @Description: * @Description:
--> -->
<template> <template>
@ -77,8 +77,8 @@ export default {
remark: undefined remark: undefined
}, },
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" }],
contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }], contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [ telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" }, { required: false, trigger: "blur", message: "手机号不能为空" },
@ -87,6 +87,8 @@ export default {
if (value) { 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) { 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("手机号格式错误")); callback(new Error("手机号格式错误"));
} else {
callback();
} }
} else { } else {
callback(); callback();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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: 2023-11-03 11:00:47 * @LastEditTime: 2023-11-22 10:27:43
* @Description: * @Description:
--> -->
<template> <template>
@ -77,8 +77,8 @@ export default {
remark: undefined remark: undefined
}, },
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" }],
contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }], contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
telephone: [ telephone: [
{ required: false, trigger: "blur", message: "手机号不能为空" }, { required: false, trigger: "blur", message: "手机号不能为空" },
@ -87,6 +87,8 @@ export default {
if (value) { 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) { 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("手机号格式错误")); callback(new Error("手机号格式错误"));
} else {
callback();
} }
} else { } else {
callback(); callback();
@ -98,6 +100,31 @@ export default {
}; };
}, },
mounted() {}, 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> </script>

View File

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

View File

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

View File

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

View File

@ -213,7 +213,7 @@ export default {
{ {
name: 'status', name: 'status',
type: 'equal', type: 'equal',
value: 3 value: 2
}, },
{ {
name: 'status', name: 'status',
@ -313,7 +313,15 @@ export default {
refreshWorkOrder(val) { refreshWorkOrder(val) {
console.log(val) console.log(val)
if (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 { } else {
this.successSubmit() this.successSubmit()
} }

View File

@ -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: 2023-11-03 11:01:24 * @LastEditTime: 2023-11-22 10:26:58
* @Description: * @Description:
--> -->
<template> <template>
@ -211,6 +211,8 @@ export default {
if (value) { 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) { 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("手机号格式错误")); callback(new Error("手机号格式错误"));
} else {
callback();
} }
} else { } else {
callback(); callback();
@ -243,13 +245,32 @@ export default {
setOut(val) { setOut(val) {
if (val === 1) { if (val === 1) {
this.isOut = true this.isOut = true
this.dataForm.outTime = ''
} else { } else {
this.isOut = false 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() { dataFormSubmit() {
console.log('111', this.dataForm)
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (!valid) { if (!valid) {
return false; return false;
@ -292,7 +313,8 @@ export default {
}); });
}, },
init(id) { init(id) {
this.dataForm.id = id || ""; this.reset()
this.dataForm.id = id || undefined;
this.visible = true; this.visible = true;
if (this.urlOptions.getOption) { if (this.urlOptions.getOption) {
this.getArr() this.getArr()

View File

@ -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: 2023-11-03 19:31:25 * @LastEditTime: 2023-11-22 08:55:37
* @Description: * @Description:
--> -->
<template> <template>
@ -82,8 +82,8 @@ export default {
}, },
proLineList: [], proLineList: [],
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" }],
productionLineId: [{ required: true, message: "产线不能为空", trigger: "blur" }], productionLineId: [{ required: true, message: "产线不能为空", trigger: "blur" }],
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }] sort: [{ required: true, message: "排序不能为空", trigger: "blur" }]
} }

View File

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

View File

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

View File

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

View File

@ -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: 2023-11-06 19:27:57 * @LastEditTime: 2023-11-22 10:40:08
* @Description: * @Description:
--> -->
<template> <template>
@ -151,7 +151,7 @@ export default {
equipmentId: undefined, equipmentId: undefined,
userName: undefined, userName: undefined,
userNames: [], userNames: [],
useTime: undefined, useTime: new Date().getTime(),
address: undefined, address: undefined,
num: 0, num: 0,
source: undefined, source: undefined,

View File

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

View File

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

View File

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

View File

@ -51,6 +51,7 @@
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
const remainBox = { const remainBox = {
name: 'RemainBox', name: 'RemainBox',
@ -124,7 +125,7 @@ export default {
{ prop: 'sectionName', label: '工段' }, { prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备名称' }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'equipmentCode', label: '设备编码' }, { prop: 'equipmentCode', label: '设备编码' },
{ prop: 'maintainDuration', label: '保养频率' }, { prop: 'maintenancePeriod', label: '保养频率' },
{ {
prop: 'maintainType', prop: 'maintainType',
label: '保养类型', label: '保养类型',
@ -195,6 +196,24 @@ export default {
this.getList(); this.getList();
}, },
methods: { 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() { initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
this.$set( this.$set(

View File

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

View File

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

View File

@ -112,7 +112,7 @@ export default {
{ {
prop: 'maintenanceStatus', prop: 'maintenanceStatus',
label: '维修状态', label: '维修状态',
filter: (v) => (v != null ? ['未完成', '完成'][v] : ''), filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
}, },
{ prop: 'maintenanceDuration', label: '维修时长(h)' }, { prop: 'maintenanceDuration', label: '维修时长(h)' },
{ prop: 'lineName', label: '产线' }, { prop: 'lineName', label: '产线' },
@ -138,8 +138,23 @@ export default {
selectOptions: [ selectOptions: [
{ name: '未完成', id: '0' }, { name: '未完成', id: '0' },
{ name: '完成', id: '1' }, { 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', type: 'button',
btnName: '查询', btnName: '查询',

View File

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