Compare commits

..

No commits in common. "478baaabd4bd29c2271096e3271488dcf9e8ad04" and "fd03fdf0469755e83b406735f22c6926244074de" have entirely different histories.

10 changed files with 99 additions and 347 deletions

View File

@ -1,8 +1,8 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-02-21 18:47:20
# @LastEditors: DY
# @LastEditTime: 2024-02-21 15:27:58
# @LastEditors: zhp
# @Description:
###
# 开发环境配置
@ -13,7 +13,7 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
@ -22,10 +22,11 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.0.30:8888'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# socket地址
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'

View File

@ -1,35 +0,0 @@
/*
* @Author: Do not edit
* @Date: 2024-02-21 13:43:02
* @LastEditTime: 2024-02-21 15:00:17
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 获得关联表名
export function getplcAllList(query) {
return request({
url: '/base/equipment-plc/listAll',
method: 'get',
params: query
})
}
// 获得设备
export function getEquipmentList(query) {
return request({
url: '/base/core-equipment/page',
method: 'get',
params: query
})
}
// 根据产线获得工段
export function listByParentId(query) {
return request({
url: '/base/core-workshop-section/listByParentId',
method: 'get',
params: query
})
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 09:04:48
* @LastEditTime: 2024-01-08 16:11:03
* @Description:
-->
<template>
@ -27,7 +27,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产品名称" prop="name">
<el-input v-model="dataForm.name" :disabled="isdetail || isedit" clearable placeholder="请输入产品名称" />
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -35,7 +35,7 @@
<el-input
v-model="dataForm.code"
clearable
:disabled="isdetail || isedit"
:disabled="isdetail"
placeholder="请输入产品编码" />
</el-form-item>
</el-col>
@ -44,12 +44,12 @@
<el-select
v-model="dataForm.materialType"
filterable
:disabled="isdetail || isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="(dict, index) in getDictDatas('material_type')"
:key="index"
v-for="dict in getDictDatas('material_type')"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -62,12 +62,12 @@
<el-select
v-model="dataForm.productType"
filterable
:disabled="isdetail || isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择产品类型">
<el-option
v-for="(dict, index) in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
:key="index"
v-for="dict in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -78,12 +78,12 @@
<el-select
v-model="dataForm.unit"
filterable
:disabled="isdetail || isedit"
:disabled="isdetail"
style="width: 100%"
placeholder="请选择单位">
<el-option
v-for="(dict, index) in getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="index"
v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -91,24 +91,24 @@
</el-col>
<el-col :span="8">
<el-form-item label="单位平方数" prop="area">
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail || isedit" clearable placeholder="请输入单位平方数" />
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="规格" prop="specifications">
<el-input v-model="dataForm.specifications" :disabled="isdetail || isedit" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
<el-input v-model="dataForm.specifications" :disabled="isdetail" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产节拍(S)" prop="processTime">
<el-form-item label="产线生产单位用时(S)" prop="processTime">
<el-input v-model.number="dataForm.processTime" :precision="4" :min="0" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="重量" prop="weight">
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail || isedit" clearable placeholder="请输入重量" />
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入重量" />
</el-form-item>
</el-col>
</el-row>
@ -241,7 +241,7 @@ export default {
productType: undefined,
area: undefined,
specifications: undefined,
processTime: undefined,
processTime: 0,
remark: undefined,
unit: undefined,
weight: undefined
@ -249,14 +249,14 @@ export default {
productAttrList: [],
visible: false,
isdetail: false,
isedit: false,
idAttrShow: false,
dataRule: {
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
}
};
},
@ -326,8 +326,6 @@ export default {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.isedit = id ? true : false;
console.log('你好', this.isedit)
this.visible = true;
if (id) {
this.idAttrShow = true
@ -345,9 +343,10 @@ export default {
// this.dataForm.area = response.data.area || 0
// this.dataForm.weight = response.data.weight || 0
// this.dataForm.specifications = response.data.specifications || undefined
// if (this.dataForm.unit !== undefined) {
// this.dataForm.unit = String(this.dataForm.unit)
// }
console.log('11res112', this.dataForm.specifications, this.dataForm.weight, this.dataForm.area)
if (this.dataForm.unit !== undefined) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.materialType !== undefined) {
this.dataForm.materialType = String(this.dataForm.materialType)
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-18 13:53:09
* @LastEditTime: 2023-11-21 18:59:54
* @Description:
-->
<template>
@ -12,6 +12,18 @@
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="工厂名称" prop="factoryId">
@ -29,36 +41,6 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车间名称" prop="roomNameDict">
<el-select
v-model="dataForm.roomNameDict"
filterable
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择车间名称">
<el-option
v-for="(dict, index) in getDictDatas('workshop')"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="产线TT值(h)" prop="tvalue">
<el-input
v-model.number="dataForm.tvalue"
@ -110,13 +92,11 @@ export default {
tvalue: 0,
factoryId: undefined,
remark: undefined,
roomNameDict: undefined
},
factoryList: [],
dataRule: {
code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }],
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }]
}
};

View File

@ -47,7 +47,6 @@ import {
} from '@/api/base/coreProductionLine';
import { getStatus } from '@/api/core/base/productionLine';
import codeFilter from '../../core/mixins/code-filter';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
@ -59,11 +58,6 @@ const tableProps = [
prop: 'factoryName',
label: '工厂'
},
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop')
},
{
prop: 'name',
label: '产线名称'
@ -77,10 +71,10 @@ const tableProps = [
label: '当前状态',
filter: codeFilter('lineStatus')
},
// {
// prop: 'tvalue',
// label: '线TT(h)'
// },
{
prop: 'tvalue',
label: '产线TT值(h)'
},
{
prop: 'description',
label: '描述'
@ -88,7 +82,7 @@ const tableProps = [
{
prop: 'remark',
label: '备注'
}
},
];
export default {

View File

@ -116,22 +116,6 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span='8'>
<el-form-item label="负责车间" prop="roomNameDict">
<el-select
v-model="dataForm.roomNameDict"
filterable
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择车间名称">
<el-option
v-for="(dict, index) in getDictDatas('workshop')"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span='8'>
<el-form-item label="关联产线" prop="productLineIds">
<el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
@ -196,7 +180,6 @@ export default {
productLineIds: [],
type: '',
workers: '',
roomNameDict: '',
status: 1
},
rules: {
@ -204,7 +187,6 @@ export default {
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
},
productList: [],
@ -282,19 +264,19 @@ export default {
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
// this.$confirm('使?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// console.log('121', this.dataForm.name)
// this.$emit("refreshDataList", {
// id: response.data,
// name: this.dataForm.name
// });
// }).catch(() => {
// this.$emit("refreshDataList");
// });
this.$confirm('是否添加预使用主原料信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log('121', this.dataForm.name)
this.$emit("refreshDataList", {
id: response.data,
name: this.dataForm.name
});
}).catch(() => {
this.$emit("refreshDataList");
});
});
});
},

View File

@ -60,7 +60,6 @@ import {
getConOrderList,
getCoreWOList
} from '@/api/base/coreWorkOrder';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
@ -83,13 +82,6 @@ const tableProps = [
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'roomNameDict',
label: '负责车间',
minWidth: 120,
filter: publicFormatter('workshop'),
showOverflowtooltip: true
},
{
prop: 'workers',
label: '负责人',
@ -109,7 +101,7 @@ const tableProps = [
{
prop: 'status',
label: '工单状态',
filter: (val) => ['', '等待', '激活', '暂停', '完成', '作废', '终止'][val]
filter: (val) => ['', '等待', '激活', '暂停', '完成', '', '', '', '', '作废'][val]
},
{
prop: 'planFinishTime',
@ -231,20 +223,6 @@ export default {
]
}
},
{
type: 'stop',
btnName: '终止',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 2
}
]
}
},
this.$auth.hasPermi(`base:core-work-order:detail`)
? {
type: 'detail',
@ -311,8 +289,7 @@ export default {
{ id: 2, name: '激活' },
{ id: 3, name: '暂停' },
{ id: 4, name: '完成' },
{ id: 5, name: '作废' },
{ id: 6, name: '终止' }
{ id: 9, name: '作废' }
],
param: 'status',
clearable: true
@ -424,17 +401,13 @@ export default {
opration = '暂停'
}
if (val.type === 'nullify') {
param.status = 5
opration = '废'
param.status = 9
opration = '废'
}
if (val.type === 'finish') {
param.status = 4
opration = '完成'
}
if (val.type === 'stop') {
param.status = 6
opration = '终止'
}
console.log('22',val)
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定",

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 09:41:39
* @LastEditTime: 2023-12-04 15:10:11
* @Description:
-->
<template>
@ -59,7 +59,7 @@
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="dict in getDictDatas('material_type')"
v-for="dict in materialList"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
@ -238,7 +238,7 @@ export default {
remark: undefined,
unit: ''
},
// materialList: [],
materialList: [],
supplierList: [],
materialAttrList: [],
unitList: [],
@ -258,18 +258,17 @@ export default {
methods: {
async getDict() {
//
// const res = await listData({
// pageNo: 1,
// pageSize: 99,
// dictType: 'material_type',
// });
// this.materialList = res.data.list
// this.materialList = res.data.list.map(item => {
// return {
// label: item.label,
// value: Number(item.value)
// }
// });
const res = await listData({
pageNo: 1,
pageSize: 99,
dictType: 'material_type',
});
this.materialList = res.data.list.map(item => {
return {
label: item.label,
value: Number(item.value)
}
});
//
const supplierRes = await getSupplierList();
this.supplierList = supplierRes.data;
@ -349,9 +348,6 @@ export default {
if (this.dataForm.unit) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.type) {
this.dataForm.type = String(this.dataForm.type)
}
});
//
this.getList();

View File

@ -45,10 +45,7 @@
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<!-- <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> -->
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit" />
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
</base-dialog>
<!-- 抽屉 详情 -->
@ -126,12 +123,11 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http';
import BasicDrawer from './components/BasicDrawer.vue';
import { publicFormatter } from '@/utils/dict';
import AddOrUpdate from './add-or-updata';
export default {
name: 'EquipmentPlcConnect',
mixins: [basicPageMixin],
components: { BasicDrawer, AddOrUpdate },
components: { BasicDrawer },
data() {
return {
searchBarKeys: ['equipmentId', 'plcId'],
@ -347,10 +343,6 @@ export default {
this.initSearchOptions();
},
methods: {
successSubmit() {
this.cancel()
this.getList()
},
async getEquipmentOptions() {
const res = await this.$axios({
url: '/base/core-equipment/listAll',
@ -477,7 +469,26 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs.addOrUpdate.dataFormSubmit()
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentPlcConnect(this.form).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
});
return;
}
//
createEquipmentPlcConnect(this.form).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
});
},
//

View File

@ -1,149 +0,0 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-21 18:31:44
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-form-item label="设备" prop="equipmentId">
<el-cascader
placeholder="请选择设备"
v-model="dataForm.equipmentId"
:options="plLineList"
:props="{value: 'id', label: 'name', children: 'children'}"
filterable />
</el-form-item>
<el-form-item label="关联表名" prop="plcId">
<el-select
v-model="dataForm.plcId"
filterable
placeholder="请选择关联表"
style="width: 100%">
<el-option
v-for="dict in plcList"
:key="dict.id"
:label="dict.plcTableName"
:value="dict.id" />
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from '../../../../core/mixins/basic-add';
import { createCorePL, updateCorePL, getCorePL, getCode, getCorePLList } from "@/api/base/coreProductionLine";
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
import { getplcAllList, listByParentId } from "@/api/equipment/base/config/config";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createCorePL,
updateURL: updateCorePL,
infoURL: getCorePL,
},
dataForm: {
id: undefined,
equipmentId: undefined,
plcId: undefined
},
plcList: [],
plLineList: [],
dataRule: {
equipmentId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
plcId: [{ required: true, message: "关联表名不能为空", trigger: "blur" }]
},
options: [{
value: 'zhinan',
label: '指南',
children: [{
value: 'shejiyuanze',
label: '设计原则',
children: [{
value: 'yizhi',
label: '一致'
}, {
value: 'fankui',
label: '反馈'
}, {
value: 'xiaolv',
label: '效率'
}, {
value: 'kekong',
label: '可控'
}]
}, {
value: 'daohang',
label: '导航'
}]
}]
};
},
created() {
this.getDict()
},
methods: {
async getDict() {
//
const res = await getplcAllList();
this.plcList = res.data;
// 线
const res1 = await getCorePLList();
this.plLineList = res1.data;
this.plLineList.forEach(item => {
listByParentId({ id: item.id }).then(resp => {
if (resp.data.length > 0) {
// item.children = resp.data
this.$set(item, 'children', resp.data)
// this.$forceUpdate()
}
})
})
console.log('你好', this.plLineList)
},
//
dataFormSubmit() {
console.log('11', this.dataForm.equipmentId)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
updateEquipmentPlcConnect({
id: this.dataForm.id,
equipmentId: this.dataForm.equipmentId[this.dataForm.equipmentId.length],
plcId: this.dataForm.plcId
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
createEquipmentPlcConnect({
id: this.dataForm.id,
equipmentId: this.dataForm.equipmentId[this.dataForm.equipmentId.length - 1],
plcId: this.dataForm.plcId
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
}
}
};
</script>