Compare commits

..

15 Commits

Author SHA1 Message Date
ceeb853783 去除限制3档计价 2025-03-17 10:35:48 +08:00
6ed21030f5 Merge branch 'projects/mes-test' into projects/mes-zjl 2025-03-17 10:25:56 +08:00
73feff0d8b 修改 2025-03-17 10:22:59 +08:00
d49a698136 Merge pull request '自测bug' (#421) from projects/mes-zjl into projects/mes-test
Reviewed-on: #421
2025-02-18 08:50:15 +08:00
6e774dfc5d 自测bug 2025-02-18 08:44:43 +08:00
3eeded056f Merge pull request '修改' (#420) from projects/mes-zjl into projects/mes-test
Reviewed-on: #420
2025-01-24 14:29:38 +08:00
881eace12f 修改 2025-01-24 14:28:28 +08:00
dad3b2da95 Merge pull request 'projects/mes-zjl' (#419) from projects/mes-zjl into projects/mes-test
Reviewed-on: #419
2025-01-10 13:59:08 +08:00
f5cfc5d2bb Merge branch 'projects/mes-test' into projects/mes-zjl 2025-01-10 13:53:55 +08:00
235b0a6512 修改部分bug 2025-01-10 13:52:13 +08:00
13bf1e0fd0 Merge pull request 'projects/mes-zhp' (#418) from projects/mes-zhp into projects/mes-test
Reviewed-on: #418
2025-01-08 16:21:21 +08:00
‘937886381’
97acb4faac Merge branch 'projects/mes-test' into projects/mes-zhp 2025-01-08 16:11:12 +08:00
‘937886381’
04a5359eda 修改 2025-01-08 16:10:46 +08:00
‘937886381’
00f54f3de6 Merge branch 'projects/mes-test' into projects/mes-zhp 2025-01-03 09:56:35 +08:00
‘937886381’
f26d7abc64 修改 2025-01-03 09:55:08 +08:00
50 changed files with 391 additions and 556 deletions

View File

@@ -18,7 +18,7 @@ VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082' VUE_APP_JIMU_API = 'http://mes2.kszny.picaiba.com'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -78,3 +78,11 @@ export function deleteLogDet(id) {
method: 'delete' method: 'delete'
}) })
} }
export function getEqMaintainPlanPageData(query) {
return request({
url: '/base/equipment-maintain-plan-det/page',
method: 'get',
params: query
})
}

View File

@@ -1,10 +1,3 @@
<!--
filename: index.vue
author: liubin
date: 2024-04-02 09:49:36
description:
-->
<template> <template>
<!-- 按钮切换 --> <!-- 按钮切换 -->
<div v-if="buttonMode" class="button-nav"> <div v-if="buttonMode" class="button-nav">
@@ -12,9 +5,8 @@
v-for="m in menus" v-for="m in menus"
:key="m" :key="m"
@click="currentMenu = m" @click="currentMenu = m"
:data-text="m"
:class="[m === currentMenu ? 'active' : '']" :class="[m === currentMenu ? 'active' : '']"
></button> >{{m}}</button>
</div> </div>
<!-- 标签切换 --> <!-- 标签切换 -->
<div v-else class="custom-tabs" style="height: 100%; width: 100%"> <div v-else class="custom-tabs" style="height: 100%; width: 100%">
@@ -75,33 +67,24 @@ export default {
} }
button { button {
height: 48px;
line-height: 48px;
cursor: pointer; cursor: pointer;
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
background: #fff; background: #fff;
border-radius: 8px; border-radius: 8px;
padding: 15px; font-size: 16px;
color: #888; font-weight: 500;
color: rgba(22, 22, 22, 0.65);
letter-spacing: 2px; letter-spacing: 2px;
flex: 1; flex: 1;
box-sizing: padding-box; box-sizing: padding-box;
position: relative; position: relative;
&::after {
content: attr(data-text);
position: absolute;
top: 5px;
left: 50%;
font-size: 16px;
font-weight: 500;
transform: translate(-50%);
}
&.active { &.active {
color: #111; color: rgba(22, 22, 22, 1);
//border-bottom: 2px solid #0b58ff; border-bottom: 4px solid #0b58ff;
box-shadow: 0px 2px 1px 1px #0b58ff;
} }
} }
} }

View File

@@ -110,6 +110,8 @@ export default {
}, },
// 处理搜索栏按钮 // 处理搜索栏按钮
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
console.log(btn);
// const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代 // const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':

View File

@@ -89,6 +89,7 @@ export const DICT_TYPE = {
// ============== ENERGY - 能源模块 ============= // ============== ENERGY - 能源模块 =============
ENERGY_UNIT: 'energy_unit', ENERGY_UNIT: 'energy_unit',
ENERGY_TYPE: 'energy_type',
EQU_ALARM_LEVEL: 'equ_alarm_level', EQU_ALARM_LEVEL: 'equ_alarm_level',
MONITOR_INDEX_TYPE: 'monitor_index_type', MONITOR_INDEX_TYPE: 'monitor_index_type',
OBJECT_TYPE: 'object_type', OBJECT_TYPE: 'object_type',

View File

@@ -92,7 +92,8 @@ export default {
type: 'select', type: 'select',
label: '能源类型', label: '能源类型',
selectOptions: [], selectOptions: [],
param: 'energyTypeId' param: 'energyTypeId',
clearable: false
}, },
{ {
type: 'select', type: 'select',
@@ -162,7 +163,6 @@ export default {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260)
}) })
this.getList();
this.getTypeList() this.getTypeList()
// 获取对象树形结构 // 获取对象树形结构
this.getObjTree() this.getObjTree()
@@ -171,7 +171,10 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.formConfig[0].selectOptions = res.data || [] this.formConfig[0].selectOptions = res.data || []
this.formConfig[0].defaultSelect = res.data[0].id
this.queryParams.energyTypeId = res.data[0].id
this.energyTypeList = res.data || [] this.energyTypeList = res.data || []
this.getList();
}) })
}, },
buttonClick(val) { buttonClick(val) {

View File

@@ -82,6 +82,7 @@ export default {
init(param) { init(param) {
this.form.connectId = param.connectId this.form.connectId = param.connectId
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
console.log(res)
this.energyListType = res.data || [] this.energyListType = res.data || []
}) })
if (param.id) { if (param.id) {

View File

@@ -37,7 +37,7 @@
@cancel="handleCancel" @cancel="handleCancel"
@confirm="handleConfirm" @confirm="handleConfirm"
:before-close="handleCancel" :before-close="handleCancel"
width='30%' width='50%'
> >
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" /> <energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
</base-dialog> </base-dialog>
@@ -60,7 +60,8 @@ const tableProps = [
}, },
{ {
prop: 'objCode', prop: 'objCode',
label: '对象编码' label: '对象编码',
minWidth: 160,
}, },
{ {
prop: 'plcTableName', prop: 'plcTableName',
@@ -69,7 +70,8 @@ const tableProps = [
{ {
prop: 'plcTableCode', prop: 'plcTableCode',
label: '关联表编码', label: '关联表编码',
showOverflowtooltip: true showOverflowtooltip: true,
minWidth: 160,
}, },
{ {
prop: 'cnName', prop: 'cnName',

View File

@@ -60,7 +60,8 @@ export default {
name: '', name: '',
code: '', code: '',
type: '', type: '',
energyTypeId: '' energyTypeId: '',
remark: ''
}, },
plcList: [], plcList: [],
objList: [], objList: [],

View File

@@ -16,7 +16,7 @@
type="text" type="text"
class="tableInnerButton" class="tableInnerButton"
@click="showInnerTable(injectData)" @click="showInnerTable(injectData)"
>详情</el-button >价格详情</el-button
> >
</el-popover> </el-popover>
</template> </template>

View File

@@ -3,7 +3,14 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="能源类型" prop="name"> <el-form-item label="能源类型" prop="name">
<el-input v-model="form.name"></el-input> <el-select v-model="form.name" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in getDictDatas(DICT_TYPE.ENERGY_TYPE)"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -213,10 +220,6 @@ export default {
// 增加 // 增加
emitButtonClick1() { emitButtonClick1() {
let n = this.tableData1.length let n = this.tableData1.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
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 = ''
@@ -225,10 +228,6 @@ export default {
}, },
emitButtonClick2() { emitButtonClick2() {
let n = this.tableData2.length let n = this.tableData2.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
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

View File

@@ -80,10 +80,14 @@ export default {
return { return {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '能源类型', label: '能源类型',
selectOptions: this.getDictDatas(this.DICT_TYPE.ENERGY_TYPE),
placeholder: '能源类型', placeholder: '能源类型',
param: 'name' labelField: 'label',
valueField: 'label',
param: 'name',
flilterable: true
}, },
{ {
type: 'button', type: 'button',

View File

@@ -219,6 +219,7 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.energyTypeList = res.data || [] this.energyTypeList = res.data || []
this.queryParams.energyTypeId = res.data[0].id
}) })
}, },
// 范围选择器 // 范围选择器

View File

@@ -7,7 +7,7 @@
--> -->
<template> <template>
<div> <div>
<div style="background: #f2f4f9; height: 40px; width: 100%"> <div style="background: #f2f4f9; height: 56px; width: 100%">
<ButtonNav <ButtonNav
:menus="['走势分析', '对比分析', '同比分析', '环比分析']" :menus="['走势分析', '对比分析', '同比分析', '环比分析']"
@change="currentMenu"> @change="currentMenu">

View File

@@ -205,6 +205,7 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.energyTypeList = res.data || []; this.energyTypeList = res.data || [];
this.queryParams.energyTypeId = res.data[0].id
}); });
}, },
getObjTree() { getObjTree() {

View File

@@ -119,12 +119,12 @@ export default {
return { return {
searchBarKeys: ['groupId', 'equipmentName'], searchBarKeys: ['groupId', 'equipmentName'],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:bind-group:update') // this.$auth.hasPermi('equipment:bind-group:update')
? { // ? {
type: 'detail', // type: 'detail',
btnName: '查看报警', // btnName: '查看报警',
} // }
: undefined, // : undefined,
this.$auth.hasPermi('equipment:bind-group:update') this.$auth.hasPermi('equipment:bind-group:update')
? { ? {
type: 'edit', type: 'edit',
@@ -372,7 +372,7 @@ export default {
handleTableBtnClick({ data, type }) { handleTableBtnClick({ data, type }) {
switch (type) { switch (type) {
case 'edit': case 'edit':
this.handleDetail(data, 'edit'); this.handleUpdate(data)
break; break;
case 'delete': case 'delete':
this.handleDelete(data); this.handleDelete(data);
@@ -432,19 +432,19 @@ export default {
}); });
}, },
// 查看报警 // 查看报警
handleDetail(row, mode = 'detail') { // handleDetail(row, mode = 'detail') {
const { equipmentId, equipmentName, groupCode, groupId, groupName, id } = // const { equipmentId, equipmentName, groupCode, groupId, groupName, id } =
row; // row;
// 打开抽屉 // // 打开抽屉
this.editMode = mode; // this.editMode = mode;
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.editVisible = true; // this.editVisible = true;
this.$nextTick(() => { // this.$nextTick(() => {
this.$refs['drawer'].init(); // this.$refs['drawer'].init();
}); // });
}, // },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;

View File

@@ -198,8 +198,8 @@ export default {
}, },
{ {
type: 'select', type: 'select',
label: '关联表编码', label: '标识名称',
placeholder: '请选择关联表编码', placeholder: '请选择标识名称',
param: 'plcId', param: 'plcId',
selectOptions: [], selectOptions: [],
filterable: true, filterable: true,

View File

@@ -195,7 +195,9 @@ export default {
}, },
methods: { methods: {
/** 批量确认 */ /** 批量确认 */
async searchBarClicked(btn) { async handleSearchBarBtnClick(btn) {
console.log(11111);
switch (btn.btnName) { switch (btn.btnName) {
case 'batchConfirm': case 'batchConfirm':
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) { if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
@@ -260,6 +262,15 @@ export default {
}) })
.catch(() => { }); .catch(() => { });
break; break;
case 'search':
this.getList()
break;
case 'add':
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break;
} }
}, },
handleSelectionChange(list) { handleSelectionChange(list) {

View File

@@ -201,7 +201,7 @@ export default {
this.groupOptions = this.groupOptions =
res1.data.map((item) => { res1.data.map((item) => {
item.label = item.label =
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict); item.name + (getDictDataLabel('workshop', item.roomNameDict) ? ' - ' + getDictDataLabel('workshop', item.roomNameDict) : '')
return item; return item;
}) || []; }) || [];
// const res = await getEquipmentAll() // const res = await getEquipmentAll()

View File

@@ -29,9 +29,9 @@ export default {
}, },
created() { created() {
}, },
mounted() { // mounted() {
this.getDataList() // this.getDataList()
}, // },
methods: { methods: {
// 获取数据列表 // 获取数据列表
getDataList() { getDataList() {

View File

@@ -39,7 +39,7 @@ export default {
const t = new Date(); const t = new Date();
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()]; const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
return { return {
searchBarKeys: ['equipmentName', 'createTime'], searchBarKeys: ['equipmentTypeId'],
equipmentTypeList:[], equipmentTypeList:[],
tableBtn: [ tableBtn: [
{ {
@@ -230,13 +230,14 @@ export default {
return; return;
} }
// 添加的提交 // 添加的提交
this.post(this.form).then((response) => { this.post(this.form).then((res) => {
console.log('res', res)
this.$modal.msgSuccess('新增成功'); this.$modal.msgSuccess('新增成功');
this.open = false; this.open = false;
this.getList() this.getList()
this.showDetailVisible = true this.showDetailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.showDetail.init(this.form.equipmentTypeId) this.$refs.showDetail.init(res.data)
}) })
}); });
}); });

View File

@@ -100,9 +100,10 @@ export default {
// console.log(this.tableData) // console.log(this.tableData)
}, },
getDataList(id) { getDataList(id) {
console.log(id)
this.dataListLoading = true; this.dataListLoading = true;
this.queryParams.equipmentTypeId = id this.queryParams.equipmentTypeId = id
console.log(id); console.log(this.queryParams.equipmentTypeId)
this.urlOptions.getDataListURL(this.queryParams).then(response => { this.urlOptions.getDataListURL(this.queryParams).then(response => {
this.tableData = response.data.list; this.tableData = response.data.list;
this.listQuery.total = response.data.total; this.listQuery.total = response.data.total;

View File

@@ -37,8 +37,8 @@
</el-form> </el-form>
<div class="blue-title">保养内容</div> <div class="blue-title">保养内容</div>
<base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData"> <base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn" <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" /> -->
</base-table> </base-table>
</div> </div>
</el-drawer> </el-drawer>

View File

@@ -289,7 +289,7 @@ export default {
const id = row.id; const id = row.id;
this.info({ id }).then((response) => { this.info({ id }).then((response) => {
this.form = response.data; this.form = response.data;
this.form.responsible = this.form.responsible ? this.form.responsible.split(',') : undefined // this.form.responsible = this.form.responsible ? this.form.responsible.split(',') : undefined
this.open = true; this.open = true;
this.title = '修改备品备件配置'; this.title = '修改备品备件配置';
}); });
@@ -300,7 +300,7 @@ export default {
if (!valid) { if (!valid) {
return; return;
} }
this.form.responsible = this.form.responsible.join(',') // this.form.responsible = this.form.responsible.join(',')/
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
this.put(this.form).then((response) => { this.put(this.form).then((response) => {

View File

@@ -136,8 +136,8 @@ export default {
select: true, select: true,
label: '备件名称', label: '备件名称',
prop: 'productMaterialId', prop: 'productMaterialId',
url: '/base/core-product-material/listAll', // TODO: 供应商 // url: '/base/core-product-material/listAll', // TODO: 供应商
// options: [], options: [],
bind: { bind: {
filterable: true, filterable: true,
clearable: false, clearable: false,
@@ -404,19 +404,19 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
async getDict() { async getDict() {
const materRes = await getMaterialTree(); // // const materRes = await getMaterialTree();
let typeId = materRes.data.find((item) => item.product === 2).id; // let typeId = materRes.data.find((item) => item.product === 2);
const listQuery = { // const listQuery = {
typeId: typeId, // typeId: typeId,
}; // };
const materData = await getMaterialList(listQuery); const materData = await getMaterialList();
this.rows[0][0].options = (materData.data || []).map((item) => ({ this.rows[0][0].options = (materData.data || []).filter(item => item.typeId === 3)
label: item.name, .map(item => ({ label: item.name, value: item.id,...item }))
value: item.id, console.log(this.rows[0][0].options);
...item
}));
}, },
updateDialogFormZ(val) { updateDialogFormZ(val) {
// console.log(this.rows[0][0].options)
const selectData = this.rows[0][0].options.find( const selectData = this.rows[0][0].options.find(
(item) => item.id === val.productMaterialId (item) => item.id === val.productMaterialId
); );

View File

@@ -62,8 +62,8 @@ function getTodayStart(today) {
/** 颜色配置 */ /** 颜色配置 */
const types = [ const types = [
{ name: '运行', color: '#288AFF' }, { name: '运行', color: '#288AFF' },
{ name: '故障', color: '#FC9C91' },
{ name: '计划停机', color: '#FFDC94' }, { name: '计划停机', color: '#FFDC94' },
{ name: '故障', color: '#FC9C91' },
{ name: '空白', color: '#F2F4F9' }, { name: '空白', color: '#F2F4F9' },
]; ];
@@ -251,7 +251,7 @@ export default class GanttGraph {
y: 0, y: 0,
}, },
data: arr.map(item => ({ data: arr.map(item => ({
name: ['运行', '故障', '计划停机'][item.status], name: ['运行', '计划停机', '故障'][item.status],
value: [0, item.startTime, item.startTime + item.duration * 60 * 1000, 0], value: [0, item.startTime, item.startTime + item.duration * 60 * 1000, 0],
itemStyle: { itemStyle: {
color: types[item.status].color, color: types[item.status].color,

View File

@@ -6,29 +6,19 @@
--> -->
<template> <template>
<div <div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
class="status-timegraph-container" <el-row class="" style="
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row
class=""
style="
margin-bottom: 12px; margin-bottom: 12px;
background: #fff; background: #fff;
padding: 16px 16px 0; padding: 16px 16px 0;
border-radius: 8px; border-radius: 8px;
"> ">
<div class="blue-title">生产节拍时序图</div> <div class="blue-title">生产节拍时序图</div>
<SearchBar <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true"
:formConfigs="searchBarFormConfig" @select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" />
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row> </el-row>
<el-row <el-row class="" style="
class=""
style="
height: 1px; height: 1px;
flex: 1; flex: 1;
margin-bottom: 12px; margin-bottom: 12px;
@@ -47,48 +37,28 @@
<div class="icon running"></div> <div class="icon running"></div>
<div>运行中</div> <div>运行中</div>
</div> </div>
<div class="legend">
<div class="icon fault"></div>
<div>故障</div>
</div>
<div class="legend"> <div class="legend">
<div class="icon stop"></div> <div class="icon stop"></div>
<div>计划停机</div> <div>计划停机</div>
</div> </div>
<div class="legend">
<div class="icon fault"></div>
<div>故障</div>
</div>
</el-col> </el-col>
</el-row> </el-row>
<div <div class="main-area" style="flex: 1; display: flex; flex-direction: column">
class="main-area" <div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div>
style="flex: 1; display: flex; flex-direction: column">
<div
class="graphs"
v-show="graphList.length"
id="status-chart"
style="height: 1px; flex: 1"></div>
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2> <h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
</div> </div>
</el-row> </el-row>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog <base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false"
dialogTitle="添加设备"
:dialogVisible="open"
width="500px"
@close="open = false"
@cancel="open = false"
@confirm="submitForm"> @confirm="submitForm">
<el-select <el-select v-if="open" style="width: 100%" filterable clearable v-model="queryParams.equipmentId"
v-if="open"
style="width: 100%"
filterable
clearable
v-model="queryParams.equipmentId"
placeholder="请选择一个设备"> placeholder="请选择一个设备">
<el-option <el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option>
v-for="eq in eqList"
:key="eq.id"
:value="eq.id"
:label="eq.name"></el-option>
</el-select> </el-select>
</base-dialog> </base-dialog>
</div> </div>
@@ -103,12 +73,6 @@ export default {
components: {}, components: {},
props: {}, props: {},
data() { data() {
const today = new Date();
const todayStart = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
);
return { return {
chart: null, chart: null,
searchBarFormConfig: [ searchBarFormConfig: [
@@ -138,7 +102,7 @@ export default {
placeholder: '选择日期', placeholder: '选择日期',
param: 'recordTime', param: 'recordTime',
required: true, required: true,
defaultSelect: moment(todayStart).format('YYYY-MM-DD HH:mm:ss'), defaultSelect:null,
}, },
{ {
type: 'button', type: 'button',
@@ -196,9 +160,19 @@ export default {
this.initProductline(); this.initProductline();
this.initWorksection(); this.initWorksection();
this.initEquipment(); this.initEquipment();
},
mounted() {
const today = new Date();
const todayStart = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
);
this.searchBarFormConfig[2].defaultSelect = moment(todayStart).format('YYYY-MM-DD HH:mm:ss')
console.log('111111', this.searchBarFormConfig[2].defaultSelect)
// this.getList(); // this.getList();
}, },
mounted() {}, // mounted() {},
watch: { watch: {
graphList: { graphList: {
handler(val) { handler(val) {
@@ -323,6 +297,7 @@ export default {
}, },
}).then(({ code, data }) => { }).then(({ code, data }) => {
if (code == 0) { if (code == 0) {
this.searchBarFormConfig[2].defaultSelect = null
this.searchBarFormConfig[1].selectOptions = data.map((item) => { this.searchBarFormConfig[1].selectOptions = data.map((item) => {
return { return {
name: item.name, name: item.name,

View File

@@ -288,7 +288,7 @@ export default {
if ( if (
moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM') moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM')
) { ) {
num = Number(moment().format('DD')); num = Number(moment().format('DD'))-1;
} else { } else {
num = 0; num = 0;
} }

View File

@@ -177,6 +177,8 @@ export default {
res.data.list.forEach(item => { res.data.list.forEach(item => {
if(item.isProduction){ if(item.isProduction){
item.str = item.strList?item.strList.join(''):'-' item.str = item.strList?item.strList.join(''):'-'
}else{
item.str = '-'
} }
}); });
this.list = res.data.list; this.list = res.data.list;

View File

@@ -46,6 +46,7 @@ import {
getGroupRule, getGroupRule,
disableGroupRule disableGroupRule
} from '@/api/base/groupSchedulingRule'; } from '@/api/base/groupSchedulingRule';
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue'; import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
import { formatDate } from '@/utils'; import { formatDate } from '@/utils';
import tableHeightMixin from '@/mixins/tableHeightMixin'; import tableHeightMixin from '@/mixins/tableHeightMixin';
@@ -78,10 +79,12 @@ export default {
return { return {
formConfig: [ formConfig: [
{ {
type: 'input', type: 'select',
label: '班次', label: '班次',
placeholder: '班次', selectOptions: [],
param: 'name', param: 'id',
defaultSelect: '',
filterable: true,
}, },
{ {
type: 'button', type: 'button',
@@ -155,19 +158,35 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
name: null, id: null,
}, },
classNameList:[]
}; };
}, },
created() { created() {
this.getClassNameList();
this.getList(); this.getList();
}, },
methods: { methods: {
getClassNameList() {
groupClassesListAll().then((res) => {
this.formConfig[0].selectOptions = res.data;
this.classNameList = res.data;
})
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
this.queryParams.classesName = val.name || undefined; if (val.id) {
this.classNameList.map((item) => {
if (val.id === item.id) {
this.queryParams.classesName = item.name
}
})
}else{
this.queryParams.classesName = ''
}
this.getList(); this.getList();
break; break;
default: default:
@@ -187,7 +206,7 @@ export default {
formatDate(item.startDay) + formatDate(item.startDay) +
'至' + '至' +
(item.endDay ? formatDate(item.endDay) : '永久'); (item.endDay ? formatDate(item.endDay) : '永久');
item.str = item.strList.join(','); item.str = item.strList.join('');
}); });
this.list = res.data.list; this.list = res.data.list;
this.total = res.data.total; this.total = res.data.total;

View File

@@ -13,6 +13,8 @@
</el-col> </el-col>
</el-row> </el-row>
<base-table <base-table
:page="1"
:limit="5000"
:table-props="tableProps" :table-props="tableProps"
:table-data="tableData" :table-data="tableData"
:max-height="tableH" :max-height="tableH"
@@ -43,7 +45,7 @@ const tableProps = [
}, },
{ {
prop: 'workTime', prop: 'workTime',
label: '工作时长' label: '工作时长(h)'
} }
] ]
export default { export default {

View File

@@ -62,7 +62,8 @@ export default {
selectOptions: [], selectOptions: [],
param: 'workOrderId', param: 'workOrderId',
clearable: false, clearable: false,
filterable: true filterable: true,
required: true
}, },
{ {
type: 'button', type: 'button',

View File

@@ -38,6 +38,7 @@ import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/t
import { parseTime } from '@/utils/ruoyi' import { parseTime } from '@/utils/ruoyi'
import TeamProductionDetail from './components/teamProductionDetail' import TeamProductionDetail from './components/teamProductionDetail'
import tableHeightMixin from '@/mixins/tableHeightMixin'; import tableHeightMixin from '@/mixins/tableHeightMixin';
import moment from 'moment'
const tableProps = [ const tableProps = [
{ {
prop: 'createTime', prop: 'createTime',
@@ -53,14 +54,12 @@ const tableProps = [
{ {
prop: 'startTime', prop: 'startTime',
label: '上班时间', label: '上班时间',
filter: parseTime, filter: (val) => moment(val).format('HH:mm')
minWidth: 160
}, },
{ {
prop: 'endTime', prop: 'endTime',
label: '下班时间', label: '下班时间',
filter: parseTime, filter: (val) => moment(val).format('HH:mm')
minWidth: 160
}, },
{ {
prop: 'classesName', prop: 'classesName',
@@ -70,7 +69,8 @@ const tableProps = [
{ {
prop: 'teamName', prop: 'teamName',
label: '班组名称', label: '班组名称',
showOverflowtooltip: true showOverflowtooltip: true,
minWidth: 100
} }
] ]
export default { export default {

View File

@@ -91,6 +91,12 @@ export default {
btnName: '查询', btnName: '查询',
name: 'search', name: 'search',
color: 'primary', color: 'primary',
},
{
type: 'button',
btnName: '返回',
name: 'return',
color: 'primary',
}, },
], ],
queryParams: { queryParams: {
@@ -279,6 +285,8 @@ export default {
}, },
async handleSearchBarBtnClick({ btnName, timeVal }) { async handleSearchBarBtnClick({ btnName, timeVal }) {
console.log(btnName);
if (btnName === 'search') {
if (timeVal && timeVal.length > 0) { if (timeVal && timeVal.length > 0) {
console.log('nihc ', timeVal) console.log('nihc ', timeVal)
if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 30 * 60 * 1000) { if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 30 * 60 * 1000) {
@@ -290,6 +298,9 @@ export default {
} else { } else {
this.queryParams.recordTime = []; this.queryParams.recordTime = [];
this.$message.warning('时间段必选!') this.$message.warning('时间段必选!')
}
} else {
this.$router.go(-1)
} }
}, },

View File

@@ -103,21 +103,6 @@
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-form-item label="优先级" prop="priority">
<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"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="工单类型" prop="type"> <el-form-item label="工单类型" prop="type">
<el-select <el-select
@@ -148,11 +133,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="负责人" prop="workers">
<el-input v-model="form.workers" :disabled="isBind"></el-input>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
@@ -293,10 +273,8 @@ export default {
deptId: undefined, deptId: undefined,
planQuantity: 0, planQuantity: 0,
materialMethod: 1, materialMethod: 1,
priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }], productLineIds: [{ lineId: null, processId: null, num: null }],
type: '', type: '',
workers: '',
planAssignmentQuantity: '', planAssignmentQuantity: '',
}, },
deptList: [], deptList: [],
@@ -304,6 +282,9 @@ export default {
name: [ name: [
{ required: true, message: '工单名称不能为空', trigger: 'blur' }, { required: true, message: '工单名称不能为空', trigger: 'blur' },
], ],
workOrderId:[
{ required: true, message: '工单名称不能为空', trigger: 'change' },
],
planProductId: [ planProductId: [
{ required: true, message: '产品名称不能为空', trigger: 'change' }, { required: true, message: '产品名称不能为空', trigger: 'change' },
], ],
@@ -476,9 +457,6 @@ export default {
? moment(res.data.planFinishTime) ? moment(res.data.planFinishTime)
.format('YYYY-MM-DD HH:mm:ss') .format('YYYY-MM-DD HH:mm:ss')
: null; : null;
this.form.priority = res.data.priority
? res.data.priority + ''
: '';
// 根据产线获取工艺 // 根据产线获取工艺
if (this.form.materialMethod === 2) { if (this.form.materialMethod === 2) {
this.form.productLineIds.forEach((item) => { this.form.productLineIds.forEach((item) => {

View File

@@ -56,16 +56,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='6'>
<el-form-item label="单价" prop="price">
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;">
</el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
</el-row>
<el-row :gutter="20">
<el-col :span='6'> <el-col :span='6'>
<el-form-item label="包装规格" prop="packSpec"> <el-form-item label="包装规格" prop="packSpec">
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable> <el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
@@ -75,7 +65,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='12'> </el-row>
<el-row :gutter="20">
<el-col :span='24'>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input> <el-input v-model="form.remark"></el-input>
</el-form-item> </el-form-item>
@@ -99,9 +91,7 @@ export default {
planQuantity: '', planQuantity: '',
planProductId: '', planProductId: '',
specifications:undefined, specifications:undefined,
price: '',
customerId: '', customerId: '',
priority: '',
packSpec: '', packSpec: '',
workers: '', workers: '',
materialMethod: 1, materialMethod: 1,
@@ -114,7 +104,8 @@ export default {
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }], name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "订单号不能为空", trigger: "blur" }], code: [{ required: true, message: "订单号不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }], planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }] planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
deliveTime: [{ required: true, message: "交货日期不能为空", trigger: "change" }]
}, },
productList: [], productList: [],
customerList: [], customerList: [],
@@ -142,9 +133,7 @@ export default {
this.form.code = res.data.code this.form.code = res.data.code
this.form.planQuantity = res.data.planQuantity this.form.planQuantity = res.data.planQuantity
this.form.planProductId = res.data.planProductId this.form.planProductId = res.data.planProductId
this.form.price = res.data.price
this.form.customerId = res.data.customerId this.form.customerId = res.data.customerId
this.form.priority = res.data.priority ? res.data.priority + '' : ''
this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : '' this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
this.form.workers = res.data.workers this.form.workers = res.data.workers
@@ -235,7 +224,6 @@ export default {
formClear() { formClear() {
this.$refs.orderAddForm.resetFields() this.$refs.orderAddForm.resetFields()
this.form.materialMethod = 1 this.form.materialMethod = 1
this.form.price = 0.00
this.form.planQuantity = 0 this.form.planQuantity = 0
this.isEdit = false this.isEdit = false
} }

View File

@@ -73,11 +73,6 @@ const tableProps = [
label: '产品规格', label: '产品规格',
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
// {
// prop: 'priority',
// label: '优先级',
// filter: publicFormatter('order_priority')
// },
{ {
prop: 'planQuantity', prop: 'planQuantity',
label: '计划加工量', label: '计划加工量',
@@ -97,12 +92,6 @@ const tableProps = [
showOverflowtooltip: true, showOverflowtooltip: true,
// subcomponent: selectMember, // subcomponent: selectMember,
}, },
{
prop: 'price',
label: '单价',
width: 100,
// subcomponent: inputArea,
},
{ {
prop: 'packSpec', prop: 'packSpec',
label: '包装规格', label: '包装规格',
@@ -130,10 +119,8 @@ export default {
code: '', code: '',
planQuantity: '', planQuantity: '',
planProductId: '', planProductId: '',
price: '',
customerId: '', customerId: '',
attr3: undefined, attr3: undefined,
priority: '',
packSpec: '', packSpec: '',
workers: '', workers: '',
materialMethod: 1, materialMethod: 1,
@@ -190,9 +177,7 @@ export default {
// this.form.code = res.data.code // this.form.code = res.data.code
// this.form.planQuantity = res.data.planQuantity // this.form.planQuantity = res.data.planQuantity
// this.form.planProductId = res.data.planProductId // this.form.planProductId = res.data.planProductId
// this.form.price = res.data.price
// this.form.customerId = res.data.customerId // this.form.customerId = res.data.customerId
// this.form.priority = res.data.priority ? res.data.priority + '' : ''
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null // this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : '' // this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
// this.form.workers = res.data.workers // this.form.workers = res.data.workers

View File

@@ -62,14 +62,14 @@
label="产品" label="产品"
show-overflow-tooltip show-overflow-tooltip
min-width="120" /> min-width="120" />
<el-table-column prop="deliveTime" label="交货时间" width="160"> <el-table-column prop="deliveTime" label="交货日期" width="160">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.deliveTime) }}</span> <span>{{ parseTime(scope.row.deliveTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="workOrderNum" label="工单数量" width="140"> <el-table-column prop="workOrderNum" label="工单数量" width="140">
<template v-slot="scope"> <template v-slot="scope">
<el-button @click="handleRoute(scope.row)" type="text"> <el-button @click="handleRoute(scope.row)" type="text" style='padding: 0px;'>
{{ scope.row.workOrderNum }} {{ scope.row.workOrderNum }}
</el-button> </el-button>
</template> </template>
@@ -78,6 +78,7 @@
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
type="text" type="text"
style='padding: 0px;'
:disabled="!(scope.row.status != 5 && scope.row.workOrderNum === 0)" :disabled="!(scope.row.status != 5 && scope.row.workOrderNum === 0)"
@click="handleClick({ data: scope.row, type: 'split' })" @click="handleClick({ data: scope.row, type: 'split' })"
v-hasPermi="['base:order-manage:split']"> v-hasPermi="['base:order-manage:split']">
@@ -86,6 +87,7 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> <span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button <el-button
type="text" type="text"
style='padding: 0px;'
:disabled=" :disabled="
!( !(
scope.row.status === 1 || scope.row.status === 1 ||
@@ -95,12 +97,22 @@
" "
@click="handleClick({ data: scope.row, type: 'bind' })" @click="handleClick({ data: scope.row, type: 'bind' })"
v-hasPermi="['base:order-manage:bindWorkOrder']"> v-hasPermi="['base:order-manage:bindWorkOrder']">
绑定工单 下发工单
</el-button>
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
@click="handleClick({ data: scope.row, type: 'stop' })"
v-hasPermi="['base:order-manage:stop']">
终止
</el-button> </el-button>
<!-- addWorkOrder --> <!-- addWorkOrder -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> <span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button <el-button
type="text" type="text"
style='padding: 0px;'
:disabled="!(scope.row.status === 2 || scope.row.status === 3)" :disabled="!(scope.row.status === 2 || scope.row.status === 3)"
@click="handleClick({ data: scope.row, type: 'complete' })" @click="handleClick({ data: scope.row, type: 'complete' })"
v-hasPermi="['base:order-manage:bindWorkOrder']"> v-hasPermi="['base:order-manage:bindWorkOrder']">
@@ -109,6 +121,7 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> <span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button <el-button
type="text" type="text"
style='padding: 0px;'
@click="handleClick({ data: scope.row, type: 'detail' })" @click="handleClick({ data: scope.row, type: 'detail' })"
v-hasPermi="['base:order-manage:detail']"> v-hasPermi="['base:order-manage:detail']">
<span class="iconfont icon-detail primary-color" /> <span class="iconfont icon-detail primary-color" />
@@ -116,6 +129,7 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> <span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button <el-button
type="text" type="text"
style='padding: 0px;'
:disabled=" :disabled="
!(scope.row.status === 1) !(scope.row.status === 1)
" "
@@ -132,18 +146,12 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> <span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button <el-button
type="text" type="text"
style='padding: 0px;'
:disabled="scope.row.status != 1" :disabled="scope.row.status != 1"
@click="handleClick({ data: scope.row, type: 'void' })" @click="handleClick({ data: scope.row, type: 'void' })"
v-hasPermi="['base:order-manage:delete']"> v-hasPermi="['base:order-manage:delete']">
作废 作废
</el-button> </el-button>
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
@click="handleClick({ data: scope.row, type: 'stop' })"
v-hasPermi="['base:order-manage:stop']">
终止
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -546,3 +554,9 @@ export default {
background-color: unset !important; background-color: unset !important;
} }
</style> </style>
<style>
.orderTable .el-table__cell {
padding: 0 !important;
height: 35px !important;
}
</style>

View File

@@ -116,10 +116,6 @@
<div class="blodTip">备注</div> <div class="blodTip">备注</div>
<div class="lightTip">{{ orderMsg.remark }}</div> <div class="lightTip">{{ orderMsg.remark }}</div>
</el-col> </el-col>
<!-- <el-col :span="3">
<div class="blodTip">负责人</div>
<div class="lightTip">{{ orderMsg.workers }}</div>
</el-col> -->
<!-- <el-col :span='3'> <!-- <el-col :span='3'>
<div class="blodTip">关联工艺</div> <div class="blodTip">关联工艺</div>
<div class="lightTip">{{processFlowName}}</div> <div class="lightTip">{{processFlowName}}</div>
@@ -249,10 +245,6 @@ const tableProps1 = [
filter: (val) => (val ? val.join(',') : ''), filter: (val) => (val ? val.join(',') : ''),
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{
prop: 'workers',
label: '负责人',
},
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',

View File

@@ -133,13 +133,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="负责人" prop="workers">
<el-input
v-model="dataForm.workers"
placeholder="请输入负责人"></el-input>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
@@ -288,7 +281,6 @@ export default {
priority: '', priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }], productLineIds: [{ lineId: null, processId: null, num: null }],
type: '', type: '',
workers: '',
status: 1, status: 1,
}, },
rules: { rules: {

View File

@@ -9,11 +9,12 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData"> :table-data="tableData">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="350" :width="300"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@@ -61,10 +62,11 @@ import {
getCoreWOList getCoreWOList
} from '@/api/base/coreWorkOrder'; } from '@/api/base/coreWorkOrder';
import { listDept } from '@/api/system/dept'; import { listDept } from '@/api/system/dept';
import tableHeightMixin from '@/mixins/tableHeightMixin';
export default { export default {
mixins: [basicPage], mixins: [basicPage,tableHeightMixin],
components: { components: {
AddWorkOrder, AddWorkOrder,
AddOrUpdate, AddOrUpdate,
@@ -88,25 +90,25 @@ export default {
// btnName: '原料信息', // btnName: '原料信息',
// } // }
// : undefined, // : undefined,
// { {
// type: 'active', type: 'active',
// btnName: '激活', btnName: '开始',
// showParam: { showParam: {
// type: '|', type: '|',
// data: [ data: [
// { {
// name: 'status', name: 'status',
// type: 'equal', type: 'equal',
// value: 1 value: 1
// }, },
// { {
// name: 'status', name: 'status',
// type: 'equal', type: 'equal',
// value: 3 value: 3
// } }
// ] ]
// } }
// }, },
{ {
type: 'pause', type: 'pause',
btnName: '暂停', btnName: '暂停',
@@ -122,15 +124,20 @@ export default {
} }
}, },
{ {
type: 'nullify', type: 'terminate',
btnName: '作废', btnName: '终止',
showParam: { showParam: {
type: '|', type: '|',
data: [ data: [
{ {
name: 'status', name: 'status',
type: 'equal', type: 'equal',
value: 1 value: 2
},
{
name: 'status',
type: 'equal',
value: 3
} }
] ]
} }
@@ -176,10 +183,9 @@ export default {
} }
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:core-work-order:delete`) {
? { type: 'nullify',
type: 'delete', btnName: '作废',
btnName: '删除',
showParam: { showParam: {
type: '|', type: '|',
data: [ data: [
@@ -190,8 +196,23 @@ export default {
} }
] ]
} }
} },
: undefined // this.$auth.hasPermi(`base:core-work-order:delete`)
// ? {
// type: 'delete',
// btnName: '删除',
// showParam: {
// type: '|',
// data: [
// {
// name: 'status',
// type: 'equal',
// value: 1
// }
// ]
// }
// }
// : undefined
].filter((v)=>v), ].filter((v)=>v),
tableData: [], tableData: [],
formConfig: [ formConfig: [
@@ -220,7 +241,8 @@ export default {
{ id: 2, name: '激活' }, { id: 2, name: '激活' },
{ id: 3, name: '暂停' }, { id: 3, name: '暂停' },
{ id: 4, name: '完成' }, { id: 4, name: '完成' },
{ id: 9, name: '作废' } { id: 5, name: '作废' },
{ id: 6, name: '终止' }
], ],
param: 'status', param: 'status',
clearable: true clearable: true
@@ -269,7 +291,7 @@ export default {
{ {
prop: 'name', prop: 'name',
label: '工单名称', label: '工单名称',
minWidth: 120, minWidth: 150,
showOverflowtooltip: true showOverflowtooltip: true
}, },
{ {
@@ -300,6 +322,7 @@ export default {
{ {
prop: 'triggerOrigin', prop: 'triggerOrigin',
label: '来源', label: '来源',
width: 120,
filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val] filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
}, },
{ {
@@ -413,15 +436,18 @@ export default {
param.status = 3 param.status = 3
opration = '暂停' opration = '暂停'
} }
if (val.type === 'terminate') {
param.status = 6
opration = '终止'
}
if (val.type === 'nullify') { if (val.type === 'nullify') {
param.status = 5 param.status = 5
opration = '废' opration = '废'
} }
if (val.type === 'finish') { if (val.type === 'finish') {
param.status = 4 param.status = 4
opration = '完成' opration = '完成'
} }
console.log('22',val)
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", { this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@@ -434,7 +460,9 @@ export default {
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
setTimeout(() => {
this.getDataList(); this.getDataList();
}, 1000);
// 分配产量 // 分配产量
if (param.status === 4) { if (param.status === 4) {
this.allocationOrder(param); this.allocationOrder(param);

View File

@@ -50,6 +50,11 @@ export default {
label: '工单名称', label: '工单名称',
showOverflowtooltip: true, showOverflowtooltip: true,
}, },
{
prop: 'productionName',
label: '产品名称',
showOverflowtooltip: true,
},
...this.dynamicProps, ...this.dynamicProps,
{ {
prop: 'sumInput', prop: 'sumInput',
@@ -70,7 +75,7 @@ export default {
}; };
}, },
mounted() { mounted() {
// this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@@ -105,7 +110,7 @@ export default {
}, },
{ {
prop: 'scrapRatio', prop: 'scrapRatio',
label: '报废比例', label: '报废比例(%)',
}, },
]; ];
this.downList.push(obj); this.downList.push(obj);
@@ -142,6 +147,7 @@ export default {
return { return {
inspectionContent: item.inspectionContent, inspectionContent: item.inspectionContent,
workOrderName: item.workOrderName, workOrderName: item.workOrderName,
productionName: item.productionName,
...keyValuePairs, ...keyValuePairs,
sumInput: item.sumInput, sumInput: item.sumInput,
sumOutput: item.sumOutput, sumOutput: item.sumOutput,

View File

@@ -1,10 +1,3 @@
<!--
filename: index.vue
author: liubin
date: 2023-08-30 14:02:49
description: 设备加工数量
-->
<template> <template>
<div style="flex: 1; display: flex; background: #f2f4f9"> <div style="flex: 1; display: flex; background: #f2f4f9">
<div <div
@@ -21,7 +14,7 @@
title="点击切换工厂" title="点击切换工厂"
@mouseenter="factoryListOpen = true" @mouseenter="factoryListOpen = true"
@mouseleave="factoryListOpen = false"> @mouseleave="factoryListOpen = false">
{{ currentFactory?.label || '点我选择设备' }} {{ currentFactory?.label || '点我选择工厂' }}
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }"> <div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
<ul <ul
class="factory-list" class="factory-list"
@@ -33,7 +26,7 @@
:data-value="fc.id" :data-value="fc.id"
class="factory-list__item" class="factory-list__item"
:class="{ 'is-current': fc.id == currentFactory?.id }"> :class="{ 'is-current': fc.id == currentFactory?.id }">
<span> <span :data-value="fc.id">
{{ fc.label }} {{ fc.label }}
</span> </span>
<svg-icon <svg-icon
@@ -56,10 +49,6 @@
:empty-text="''" :empty-text="''"
icon-class="custom-icon-class" icon-class="custom-icon-class"
@node-click="handleSidebarItemClick"> @node-click="handleSidebarItemClick">
<!-- <div class="custom-tree-node" slot-scope="{ node, data }">
<span class="icon"></span>
<span>{{ node.label }}</span>
</div> -->
</el-tree> </el-tree>
</div> </div>
</div> </div>
@@ -106,20 +95,16 @@
<div v-else class="no-data-bg"></div> <div v-else class="no-data-bg"></div>
</el-col> </el-col>
</el-row> </el-row>
<!-- <transition appear name="vvv" mode="out-in"></transition> -->
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// import Graph from './graph.vue';
import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters'; import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters';
import tableHeightMixin from '@/mixins/tableHeightMixin'; import tableHeightMixin from '@/mixins/tableHeightMixin';
export default { export default {
name: 'EquipmentProcessAmount', name: 'EquipmentProcessAmount',
// components: { Graph },
mixins: [tableHeightMixin], mixins: [tableHeightMixin],
props: {}, props: {},
data() { data() {
@@ -139,92 +124,7 @@ export default {
{ name: '5', value: 5 }, { name: '5', value: 5 },
{ name: '6', value: 6 }, { name: '6', value: 6 },
], ],
sidebarContent: [ sidebarContent: [],
// {
// id: 'fc1',
// name: '工厂',
// lines: [
// {
// name: '产线1',
// id: 'pl1',
// sections: [
// {
// name: '工段1',
// id: 'pl1ws1',
// equipments: [
// {
// name: '设备1',
// id: 'pl1ws1--eq1',
// },
// {
// name: '设备2',
// id: 'pl1ws1--eq2',
// },
// {
// name: '设备3',
// id: 'pl1ws1--eq3',
// },
// ],
// },
// {
// name: '工段2',
// id: 'pl1ws2',
// equipments: [
// {
// name: '设备1',
// id: 'pl2ws1--eq1',
// },
// {
// name: '设备2',
// id: 'pl2ws1--eq2',
// },
// {
// name: '设备3',
// id: 'pl2ws1--eq3',
// },
// ],
// },
// {
// name: '工段3',
// id: 'pl1ws3',
// equipments: [
// {
// name: '设备1',
// id: 'pl3ws1--eq1',
// },
// {
// name: '设备2',
// id: 'pl3ws1--eq2',
// },
// {
// name: '设备3',
// id: 'pl3ws1--eq3',
// },
// ],
// },
// ],
// },
// {
// name: '产线2',
// id: 'pl2',
// sections: [
// {
// name: '工段1',
// id: 'pl2ws1',
// },
// {
// name: '工段2',
// id: 'pl2ws2',
// },
// {
// name: '工段3',
// id: 'pl2ws3',
// },
// ],
// },
// ],
// },
],
tableList: [], tableList: [],
queryParams: { queryParams: {
id: null, id: null,
@@ -241,6 +141,7 @@ export default {
param: 'workOrderId', param: 'workOrderId',
onchange: true, onchange: true,
filterable: true, filterable: true,
clearable: false
}, },
{ {
type: 'datePicker', type: 'datePicker',
@@ -264,20 +165,6 @@ export default {
{ {
type: 'separate', type: 'separate',
}, },
// {
// type: 'button',
// btnName: '表格',
// name: 'table',
// plain: true,
// color: 'success',
// },
// {
// type: 'button',
// btnName: '图表',
// name: 'graph',
// plain: true,
// color: 'warning',
// },
{ {
type: this.$auth.hasPermi('base:equipment-group:export') type: this.$auth.hasPermi('base:equipment-group:export')
? 'button' ? 'button'
@@ -291,15 +178,12 @@ export default {
tableProps: [ tableProps: [
{ prop: 'lineName', label: '产线' }, { prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' }, { prop: 'sectionName', label: '工段' },
// { prop: 'externalCode', label: '设备编码' },
{ prop: 'equipmentId', label: '设备编码' }, { prop: 'equipmentId', label: '设备编码' },
{ prop: 'equipmentName', label: '设备名称' }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'totalQuantity', label: '加工数量' }, { prop: 'totalQuantity', label: '加工数量' },
], ],
mode: 'table', // table | graph mode: 'table', // table | graph
queryParams: { queryParams: {
// pageNo: 1,
// pageSize: 999,
recordTime: [], recordTime: [],
equipmentId: null, equipmentId: null,
lineId: null, lineId: null,
@@ -313,28 +197,10 @@ export default {
}, },
}; };
}, },
// mounted() {
// },
computed: { computed: {
// id() {
// return this.$route.params.equipmentId;
// },
// code() {
// return this.$route.params.equipmentCode;
// },
// name() {
// return this.$route.params.equipmentName;
// },
}, },
mounted() { mounted() {
this.getDict(); this.getDict();
// if (this.id) this.$set(this.queryParams, 'id', this.id);
// if (this.code)
// this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.code);
// if (this.name)
// this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name);
// this.handleResponse();
}, },
methods: { methods: {
handleSearchBarChanged({ param, value }) { handleSearchBarChanged({ param, value }) {
@@ -349,28 +215,14 @@ export default {
} }
}, },
getDict() { getDict() {
// 获取产品的属性列表
// getCustomerList().then((response) => {
// console.log(response);
// this.customerList = response.data
// // this.listQuery.total = response.data.total;
// })
// getModelList().then((response) => {
// console.log(response);
// this.modelList = response.data
// // this.listQuery.total = response.data.total;
// })
getWorkOrderList().then((res) => { getWorkOrderList().then((res) => {
console.log(res); console.log(res);
// console.log(response);
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => { this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
return { return {
name: item.name, name: item.name,
id: item.id, id: item.id,
}; };
}); });
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
}); });
}, },
buildProps(table) { buildProps(table) {
@@ -532,12 +384,9 @@ export default {
console.log(res.data); console.log(res.data);
this.sidebarContent = res.data; this.sidebarContent = res.data;
this.buildTree(res.data); this.buildTree(res.data);
this.currentFactory = null
console.log('tree', this.sidebarContent); console.log('tree', this.sidebarContent);
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
}); });
// const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder');
// console.log(data)
}, },
handleTabClick(tab, event) { handleTabClick(tab, event) {
@@ -549,6 +398,7 @@ export default {
const fcId = event.target.dataset.value; const fcId = event.target.dataset.value;
this.handleSidebarItemClick({ id: fcId, type: '工厂' }); this.handleSidebarItemClick({ id: fcId, type: '工厂' });
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId); this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
console.log('factory change', this.currentFactory);
}, },
handleSidebarItemClick({ label, id, type }) { handleSidebarItemClick({ label, id, type }) {

View File

@@ -83,13 +83,7 @@
</el-table> </el-table>
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogVisible="open" :dialogTitle="title" width="800px" class="dialog" :before-close='cancel'>
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@@ -163,7 +157,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>

View File

@@ -57,13 +57,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" :before-close="cancel" width="800px" class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="字典类型"> <el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" /> <el-input v-model="form.dictType" :disabled="true" />
@@ -98,7 +92,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>
@@ -132,7 +126,7 @@ export default {
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: undefined status: undefined

View File

@@ -60,13 +60,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" :before-close="cancel" width="800px" class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="name"> <el-form-item label="字典名称" prop="name">
<el-input v-model="form.name" placeholder="请输入字典名称" /> <el-input v-model="form.name" placeholder="请输入字典名称" />
@@ -87,7 +81,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>
@@ -118,7 +112,7 @@ export default {
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
name: undefined, name: undefined,
type: undefined, type: undefined,
status: undefined, status: undefined,

View File

@@ -88,13 +88,7 @@
</el-table> </el-table>
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="800px" class="dialog" :before-close="cancel">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@@ -276,7 +270,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>

View File

@@ -54,13 +54,7 @@
@pagination="getList"/> @pagination="getList"/>
<!-- 添加或修改岗位对话框 --> <!-- 添加或修改岗位对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="800px" class="dialog" :before-close="cancel">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="name"> <el-form-item label="岗位名称" prop="name">
<el-input v-model="form.name" placeholder="请输入岗位名称" /> <el-input v-model="form.name" placeholder="请输入岗位名称" />
@@ -85,7 +79,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button> <el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button> <el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </base-dialog>
</div> </div>
</template> </template>
@@ -116,7 +110,7 @@ export default {
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 20,
code: undefined, code: undefined,
name: undefined, name: undefined,
status: undefined status: undefined

View File

@@ -151,7 +151,6 @@ export default {
? { ? {
type: 'dataAuth', type: 'dataAuth',
btnName: '数据权限', btnName: '数据权限',
// showTip: "新增工单",
} }
: undefined, : undefined,
this.$auth.hasPermi('system:role:update') this.$auth.hasPermi('system:role:update')

View File

@@ -68,7 +68,7 @@
</el-row> </el-row>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="50%" :before-close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@@ -180,6 +180,7 @@
<base-dialog <base-dialog
:dialogTitle="upload.title" :dialogTitle="upload.title"
:dialogVisible="upload.open" :dialogVisible="upload.open"
:before-close="cancelImport"
width="400px"> width="400px">
<el-upload <el-upload
ref="upload" ref="upload"
@@ -219,7 +220,7 @@
</base-dialog> </base-dialog>
<!-- 分配角色 --> <!-- 分配角色 -->
<base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px"> <base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px" :before-close='cancelRole'>
<el-form :model="form" label-width="80px"> <el-form :model="form" label-width="80px">
<el-form-item label="用户名称"> <el-form-item label="用户名称">
<el-input v-model="form.username" :disabled="true" /> <el-input v-model="form.username" :disabled="true" />
@@ -628,6 +629,9 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
cancelImport() {
this.upload.open = false;
},
// 取消按钮(角色权限) // 取消按钮(角色权限)
cancelRole() { cancelRole() {
this.openRole = false; this.openRole = false;