Merge pull request '更新bug' (#412) from projects/mes-zwq into projects/mes-test
Reviewed-on: #412
This commit is contained in:
commit
baede9ef34
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-15 17:19:19
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-12-27 15:20:14
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
@ -170,3 +170,11 @@ export function updateBatch(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 更新订单表与工单关联表 多对多
|
||||
export function updateConCoreWOr(data) {
|
||||
return request({
|
||||
url: '/base/core-order-con-work-order/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -23,6 +23,13 @@ export function getItemPageData(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getByEquId(id) {
|
||||
return request({
|
||||
url: '/base/equipment-maintain-program/getByEquId?id=' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getItemData(id) {
|
||||
return request({
|
||||
url: 'base/equipment-maintain-program/get?id=' + id,
|
||||
|
@ -37,7 +37,7 @@
|
||||
<script>
|
||||
import { createPlanDet, updatePlanDet, getPlanDet } from '@/api/equipment/base/maintain/planconfig';
|
||||
import { getEquipmentPage } from '@/api/base/equipment'
|
||||
import { getItemPageData } from '@/api/equipment/base/maintain/items';
|
||||
import { getByEquId } from '@/api/equipment/base/maintain/items';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -94,20 +94,14 @@ export default {
|
||||
});
|
||||
},
|
||||
async handleChange(val) {
|
||||
console.log(val);
|
||||
let equipmentTypeId = undefined
|
||||
this.eqList.forEach((ele) => {
|
||||
if (ele.id == val) {
|
||||
equipmentTypeId = ele.equipmentTypeId
|
||||
}
|
||||
})
|
||||
const { code, data } = await getItemPageData({
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
equipmentTypeId: equipmentTypeId,
|
||||
})
|
||||
this.programList = data.list
|
||||
console.log(data);
|
||||
// let equipmentTypeId = undefined
|
||||
// this.eqList.forEach((ele) => {
|
||||
// if (ele.id == val) {
|
||||
// equipmentTypeId = ele.equipmentTypeId
|
||||
// }
|
||||
// })
|
||||
const { code, data } = await getByEquId(val)
|
||||
this.programList = data
|
||||
},
|
||||
handleDecChange(val) {
|
||||
let maintenanceDes = undefined
|
||||
|
@ -70,6 +70,12 @@ import { getList,} from "@/api/base/qualityScrapType";
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
|
||||
props: {
|
||||
mainId: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@ -96,7 +102,7 @@ export default {
|
||||
id: undefined,
|
||||
program: undefined,
|
||||
resultType: undefined,
|
||||
equipmentTypeId: undefined,
|
||||
mainId:this.mainId,
|
||||
minValue: undefined,
|
||||
maxValue: undefined,
|
||||
maintainResult:undefined,
|
||||
@ -117,7 +123,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getDict()
|
||||
console.log('我看看', this.dataForm)
|
||||
},
|
||||
methods: {
|
||||
handleClear() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-07-19 14:47:02
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-12-13 15:50:49
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -28,10 +28,8 @@ export default {
|
||||
activated() {
|
||||
},
|
||||
methods: {
|
||||
init(obj) {
|
||||
console.log(obj);
|
||||
this.dataForm.id = obj.id || "";
|
||||
this.dataForm.equipmentTypeId = obj.equipmentTypeId || "";
|
||||
init(id) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
if (this.urlOptions.getOption) {
|
||||
this.getArr()
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-07-19 09:49:22
|
||||
* @LastEditTime: 2024-07-22 09:17:31
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-12-13 15:52:24
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -88,12 +88,8 @@ export default {
|
||||
if (val.type === "edit") {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "编辑"
|
||||
let obj = {
|
||||
id: val.data.id,
|
||||
equipmentTypeId:val.data.equipmentTypeId
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(obj);
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
this.deleteHandle(val.data.id, val.data.program, val.data._pageIndex)
|
||||
|
@ -186,7 +186,7 @@ export default {
|
||||
handleDetail(row) {
|
||||
this.showDetailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDetail.init(row.equipmentTypeId)
|
||||
this.$refs.showDetail.init(row.id)
|
||||
})
|
||||
// alert('跳转到 保养记录')
|
||||
// console.log(row)
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-07-12 13:28:21
|
||||
* @LastEditTime: 2024-07-23 14:00:38
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-12-13 16:03:29
|
||||
* @LastEditors: zwq
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -22,7 +22,7 @@
|
||||
</el-drawer>
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel" width="30%">
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit"></add-or-update>
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" :main-id="queryParams.mainId"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
equipmentTypeId:null,
|
||||
mainId:null,
|
||||
},
|
||||
tableProps,
|
||||
basePath: 'base/equipment-maintain-program',
|
||||
@ -105,21 +105,18 @@ export default {
|
||||
},
|
||||
getDataList(id) {
|
||||
this.dataListLoading = true;
|
||||
this.queryParams.equipmentTypeId = id
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
this.queryParams.mainId = id
|
||||
this.urlOptions.getDataListURL(this.queryParams).then(response => {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
this.queryParams.total = response.data.total;
|
||||
this.dataListLoading = false
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = '新增'
|
||||
let obj = {
|
||||
equipmentTypeId: this.queryParams.equipmentTypeId
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(obj)
|
||||
this.$refs.addOrUpdate.init()
|
||||
});
|
||||
},
|
||||
init(id) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-14 15:24:11
|
||||
* @LastEditTime: 2024-12-12 09:54:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -83,7 +83,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="showTime">
|
||||
<el-form-item label="生产单位用时" prop="processTime">
|
||||
<el-form-item label="生产单位用时(s)" prop="processTime">
|
||||
<el-input
|
||||
v-model.number="dataForm.processTime"
|
||||
type="number"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-07-01 14:54:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-21 11:19:51
|
||||
* @LastEditTime: 2024-12-16 10:03:30
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -346,6 +346,7 @@ export default {
|
||||
this.listQuery.typeId = data.id || undefined;
|
||||
this.listQuery.product = data.product;
|
||||
this.$refs.searchBarForm.formInline.type = data.name || undefined;
|
||||
this.getDataList()
|
||||
},
|
||||
// 新增节点
|
||||
append(data) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-14 09:26:53
|
||||
* @LastEditTime: 2024-12-12 16:13:11
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -41,18 +41,19 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料批次" prop="materialDateId">
|
||||
<el-form-item label="物料批次" prop="materialDate">
|
||||
<el-select
|
||||
v-model="dataForm.materialDateId"
|
||||
v-model="dataForm.materialDate"
|
||||
clearable
|
||||
filterable
|
||||
allow-create
|
||||
placeholder="请选择物料批次"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in materialDateList"
|
||||
:key="dict.id"
|
||||
:label="dict.code"
|
||||
:value="dict.id" />
|
||||
:value="dict.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -164,7 +165,7 @@ export default {
|
||||
id: undefined,
|
||||
materialId: undefined,
|
||||
materialCode: undefined,
|
||||
materialDateId: undefined,
|
||||
materialDate: undefined,
|
||||
equipmentId: undefined,
|
||||
userName: undefined,
|
||||
userNames: [],
|
||||
@ -208,15 +209,17 @@ export default {
|
||||
methods: {
|
||||
async getDictData() {
|
||||
const materRes = await getMaterialTree(); //
|
||||
let typeId = materRes.data.find(item=>item.product === 0).id
|
||||
let typeId = materRes.data.find((item) => item.product === 0).id;
|
||||
const listQuery = {
|
||||
typeId:typeId
|
||||
}
|
||||
typeId: typeId,
|
||||
};
|
||||
const materData = await getMaterialList(listQuery);
|
||||
this.materialList = [];
|
||||
this.materialList = materData.data;
|
||||
if (!this.dataForm.id) {
|
||||
const dateRes = await getMaterDateList();
|
||||
this.materialDateList = dateRes.data;
|
||||
}
|
||||
const eqRes = await getEqListAll();
|
||||
this.eqList = eqRes.data;
|
||||
const workerRes = await listSimpleUsers();
|
||||
@ -257,7 +260,7 @@ export default {
|
||||
this.dataForm.id = response.data.id;
|
||||
this.dataForm.materialCode = response.data.materialCode;
|
||||
this.dataForm.materialId = response.data.materialId;
|
||||
this.dataForm.materialDateId = response.data.materialDateId;
|
||||
this.dataForm.materialDate = response.data.materialDateName;
|
||||
this.dataForm.equipmentId = response.data.equipmentId;
|
||||
this.dataForm.useTime = response.data.useTime;
|
||||
// this.dataForm.userName = response.data.userName
|
||||
@ -265,6 +268,11 @@ export default {
|
||||
this.dataForm.source = response.data.source;
|
||||
this.dataForm.remark = response.data.remark;
|
||||
this.dataForm.userNames = response.data.userName.split(',');
|
||||
getMaterDateList({ materialId: this.dataForm.materialId }).then(
|
||||
(res) => {
|
||||
this.materialDateList = res.data;
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
@ -2,21 +2,26 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-11-19 16:49:09
|
||||
* @LastEditTime: 2024-12-27 15:34:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
||||
<el-row v-show="workOrderButton.length !== 0" class="" style="
|
||||
margin-bottom: 4px;
|
||||
border-radius: 8px;
|
||||
">
|
||||
<workOrderNav :id-list="workOrderButton" @getWorkOrderId="getId">
|
||||
</workOrderNav>
|
||||
<div
|
||||
class="status-timegraph-container"
|
||||
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
||||
<el-row
|
||||
v-show="workOrderButton.length !== 0"
|
||||
class=""
|
||||
style="margin-bottom: 4px; border-radius: 8px">
|
||||
<workOrderNav
|
||||
:id-list="workOrderButton"
|
||||
@getWorkOrderId="getId"></workOrderNav>
|
||||
</el-row>
|
||||
<el-row class="" style="
|
||||
<el-row
|
||||
class=""
|
||||
style="
|
||||
height: 1px;
|
||||
flex: .3;
|
||||
flex: 0.3;
|
||||
margin-bottom: 12px;
|
||||
background: #fff;
|
||||
padding: 16px;
|
||||
@ -26,41 +31,123 @@
|
||||
">
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1 class='orderTitle'>工单编码:{{ dataForm.code }}</h1>
|
||||
<el-button type="primary" plain style='position: absolute;right: 16px;top:5px' v-show="workOrderButton.length === 0" @click='goWorkOrderList()'><svg-icon icon-class="return" />返回</el-button>
|
||||
<h1 class="orderTitle">工单编码:{{ dataForm.code }}</h1>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
style="position: absolute; right: 16px; top: 5px"
|
||||
v-show="workOrderButton.length === 0"
|
||||
@click="goWorkOrderList()">
|
||||
<svg-icon icon-class="return" />
|
||||
返回
|
||||
</el-button>
|
||||
</div>
|
||||
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||
基本信息
|
||||
</small-title>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4"><p class='title'>工单名称</p><p class='text'>{{ dataForm.name }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>工单来源</p><p class='text'>{{ dataForm.triggerOrigin === 1 ? 'MES-手动' : (dataForm.triggerOrigin === 2 ? 'MES-订单下发' : (dataForm.triggerOrigin === 3 ? 'ERP' : ''))}}</p>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单名称</p>
|
||||
<p class="text">{{ dataForm.name }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4"><p class='title'>所属订单</p>
|
||||
<p class='text' style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;' :title="orderList.map(item => item.orderName).join(', ')">{{ orderList.map(item => item.orderName).join(', ') }}</p>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单来源</p>
|
||||
<p class="text">
|
||||
{{
|
||||
dataForm.triggerOrigin === 1
|
||||
? 'MES-手动'
|
||||
: dataForm.triggerOrigin === 2
|
||||
? 'MES-订单下发'
|
||||
: dataForm.triggerOrigin === 3
|
||||
? 'ERP'
|
||||
: ''
|
||||
}}
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="4"><p class='title'>产品名称</p><p class='text'>{{ dataForm.productName }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>规 格</p><p class='text'>{{ dataForm.specifications }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>计划生产数量</p><p class='text'>{{ dataForm.planQuantity }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>预计用时(小时)</p><p class='text'>{{ dataForm.remainingTime }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>计划投入数量</p><p class='text'>{{ dataForm.planAssignQuantity }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>优先级</p><p class='text'> {{ fitlerP(dataForm.priority) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>负责人</p><p class='text'>{{ dataForm.workers }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>关联产线</p>
|
||||
<p class='text'><span v-for="(item, index) in dataForm.productLineIds" :key="index" style="margin-right: 10px">{{ item.lineName
|
||||
}}</span></p>
|
||||
<el-col :span="4">
|
||||
<p class="title">所属订单</p>
|
||||
<p
|
||||
class="text"
|
||||
style="
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
"
|
||||
:title="orderList.map((item) => item.orderName).join(', ')">
|
||||
{{ orderList.map((item) => item.orderName).join(', ') }}
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">产品名称</p>
|
||||
<p class="text">{{ dataForm.productName }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">规 格</p>
|
||||
<p class="text">{{ dataForm.specifications }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划生产数量</p>
|
||||
<p class="text">{{ dataForm.planQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">预计用时(小时)</p>
|
||||
<p class="text">{{ dataForm.remainingTime }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划投入数量</p>
|
||||
<p class="text">{{ dataForm.planAssignQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">优先级</p>
|
||||
<p class="text">{{ fitlerP(dataForm.priority) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">负责人</p>
|
||||
<p class="text">{{ dataForm.workers }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">关联产线</p>
|
||||
<p class="text">
|
||||
<span
|
||||
v-for="(item, index) in dataForm.productLineIds"
|
||||
:key="index"
|
||||
style="margin-right: 10px">
|
||||
{{ item.lineName }}
|
||||
</span>
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">物料计算方式</p>
|
||||
<p class="text">
|
||||
{{
|
||||
dataForm.materialMethod === 1
|
||||
? '产品基础'
|
||||
: dataForm.materialMethod === 2
|
||||
? '工艺扩展'
|
||||
: ''
|
||||
}}
|
||||
</p>
|
||||
</el-col>
|
||||
<el-col :span="4"><p class='title'>物料计算方式</p><p class='text'>{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展'
|
||||
:
|
||||
'' }}</p></el-col>
|
||||
|
||||
<el-col :span="4"><p class='title'>关联工艺</p><p class='text'>{{ dataForm.processFlowName }}</p></el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">关联工艺</p>
|
||||
<p class="text">
|
||||
<span
|
||||
v-for="(item, index) in dataForm.productLineIds"
|
||||
:key="index"
|
||||
style="margin-right: 10px">
|
||||
{{ item.processFlowName }}
|
||||
</span>
|
||||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="" style="
|
||||
<el-row
|
||||
class=""
|
||||
style="
|
||||
height: 1px;
|
||||
flex: 1;
|
||||
margin-bottom: 12px;
|
||||
@ -74,45 +161,108 @@
|
||||
<el-tab-pane label="生产信息" name="produce">
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4"><p class='title'>工单创建时间</p><p class='text'>{{ parseTime(dataForm.createTime) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>计划开始时间</p><p class='text'>{{ parseTime(dataForm.planStartTime) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>计划完成时间</p><p class='text'>{{ parseTime(dataForm.planFinishTime) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>预计结束时间</p><p class='text'>{{ parseTime(dataForm.expectedFinishTime) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>实际开始时间</p><p class='text'>{{ parseTime(dataForm.startProduceTime) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>实际完成时间</p><p class='text'>{{ parseTime(dataForm.finishProduceTime) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>工单状态</p><p class='text'>{{ fitlerS(dataForm.status) }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>实际投入数量</p><p class='text'>{{ dataForm.assignQuantity }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>实际生产数量</p><p class='text'>{{ dataForm.actualQuantity }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>废片数量</p><p class='text'>{{ dataForm.nokQuantity }}</p></el-col>
|
||||
<el-col :span="4"><p class='title'>检测瑕疵数</p><p class='text'>{{ dataForm.unpassCheckNum }}</p></el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单创建时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.createTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划开始时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.planStartTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">计划完成时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.planFinishTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">预计结束时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.expectedFinishTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际开始时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.startProduceTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际完成时间</p>
|
||||
<p class="text">{{ parseTime(dataForm.finishProduceTime) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">工单状态</p>
|
||||
<p class="text">{{ fitlerS(dataForm.status) }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际投入数量</p>
|
||||
<p class="text">{{ dataForm.assignQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">实际生产数量</p>
|
||||
<p class="text">{{ dataForm.actualQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">废片数量</p>
|
||||
<p class="text">{{ dataForm.nokQuantity }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<p class="title">检测瑕疵数</p>
|
||||
<p class="text">{{ dataForm.unpassCheckNum }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单信息" name="order">
|
||||
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize" :table-data="orderList">
|
||||
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="orderList">
|
||||
<method-btn
|
||||
v-if="!isdetail"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="预计用料" name="material">
|
||||
<base-table :max-height="tableH" :table-props="tableProps1" :page="listQuery1.pageNo"
|
||||
:limit="listQuery1.pageSize" :table-data="materialList" />
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tableProps1"
|
||||
:page="listQuery1.pageNo"
|
||||
:limit="listQuery1.pageSize"
|
||||
:table-data="materialList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="质量信息" name="quality">
|
||||
<base-table :max-height="tableH" :table-props="tablePropsQuality" :table-data="qualityList" :page="1"
|
||||
<span style="font-size: 14px;">该工单未通过检测数合计:{{ allSumScrap }}</span>
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tablePropsQuality"
|
||||
:table-data="qualityList"
|
||||
:page="1"
|
||||
:limit="10" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="能源信息" name="energy">
|
||||
<div class="toggleTabBox">
|
||||
<div :class="{ active: activeModule === 'dataList' }" @click="toggleTab('dataList')">数据列表</div>
|
||||
<div :class="{ active: activeModule === 'barChart' }" @click="toggleTab('barChart')">柱状图</div>
|
||||
<div
|
||||
:class="{ active: activeModule === 'dataList' }"
|
||||
@click="toggleTab('dataList')">
|
||||
数据列表
|
||||
</div>
|
||||
<div
|
||||
:class="{ active: activeModule === 'barChart' }"
|
||||
@click="toggleTab('barChart')">
|
||||
柱状图
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-show="activeModule === 'dataList'">
|
||||
<!-- 表格 -->
|
||||
<base-table :max-height="tableH" :table-props="tablePropsEnergy" :page="listQueryEnergy.pageNo"
|
||||
:limit="listQueryEnergy.pageSize" :table-data="energyList" />
|
||||
<base-table
|
||||
:max-height="tableH"
|
||||
:table-props="tablePropsEnergy"
|
||||
:page="listQueryEnergy.pageNo"
|
||||
:limit="listQueryEnergy.pageSize"
|
||||
:table-data="energyList" />
|
||||
</div>
|
||||
<!-- 图形 -->
|
||||
<div v-show="activeModule === 'barChart'">
|
||||
@ -121,7 +271,6 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-row>
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
@ -137,19 +286,23 @@
|
||||
|
||||
<script>
|
||||
// import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById,getMaterialCostWorkOrder } from "@/api/base/coreWorkOrder";
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
import { getOrderEnergyData } from "@/api/monitoring/orderEnergy";
|
||||
// import { orderList } from "@/api/base/orderManage";
|
||||
import {
|
||||
getStatisticalDataPage,
|
||||
} from '@/api/monitoring/statisticalData';
|
||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||
getCoreWO,
|
||||
getMaterialBomPage,
|
||||
getConOrderList,
|
||||
getCoreWOListById,
|
||||
getMaterialCostWorkOrder,
|
||||
} from '@/api/base/coreWorkOrder';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
import { getOrderEnergyData } from '@/api/monitoring/orderEnergy';
|
||||
// import { orderList } from "@/api/base/orderManage";
|
||||
import { getStatisticalDataPage } from '@/api/monitoring/statisticalData';
|
||||
import { getProcessFlowList } from '@/api/base/orderManage';
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { publicFormatter } from "@/utils/dict";
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import workOrderNav from './workOrderNav.vue'
|
||||
import BarChart from "./barChart"
|
||||
import { publicFormatter } from '@/utils/dict';
|
||||
import { parseTime } from '@/utils/ruoyi';
|
||||
import workOrderNav from './workOrderNav.vue';
|
||||
import BarChart from './barChart';
|
||||
const tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
@ -176,28 +329,28 @@ const tableProps = [
|
||||
{
|
||||
prop: 'actualAssignmentQuantity',
|
||||
label: '实际分配数量',
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps1 = [
|
||||
{
|
||||
prop: 'materialName',
|
||||
label: '物料名称'
|
||||
label: '物料名称',
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
filter: publicFormatter('unit_dict')
|
||||
filter: publicFormatter('unit_dict'),
|
||||
},
|
||||
{
|
||||
prop: 'remainingNum',
|
||||
label: '剩余生产预计消耗'
|
||||
label: '剩余生产预计消耗',
|
||||
},
|
||||
];
|
||||
const tablePropsEnergy = [
|
||||
{
|
||||
prop: 'objName',
|
||||
label: '对象名称'
|
||||
label: '对象名称',
|
||||
},
|
||||
{
|
||||
prop: 'objCode',
|
||||
@ -216,11 +369,11 @@ const tablePropsEnergy = [
|
||||
},
|
||||
{
|
||||
prop: 'endNum',
|
||||
label: '工单结束值/当前值'
|
||||
label: '工单结束值/当前值',
|
||||
},
|
||||
{
|
||||
prop: 'useNum',
|
||||
label: '使用量'
|
||||
label: '使用量',
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@ -229,16 +382,16 @@ export default {
|
||||
computed: {
|
||||
tablePropsQuality() {
|
||||
return [
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'workOrderName',
|
||||
label: '工单名称',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'productionName',
|
||||
label: '产品',
|
||||
},
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'workOrderName',
|
||||
// label: '工单名称',
|
||||
// },
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'productionName',
|
||||
// label: '产品',
|
||||
// },
|
||||
{
|
||||
// width: 160,
|
||||
prop: 'inspectionContent',
|
||||
@ -248,7 +401,7 @@ export default {
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'sumScrap',
|
||||
label: '未检测总数',
|
||||
label: '未通过检测总数',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
@ -291,8 +444,9 @@ export default {
|
||||
workOrderId: undefined,
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
infoURL: getCoreWO
|
||||
infoURL: getCoreWO,
|
||||
},
|
||||
allSumScrap: 0,
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
@ -320,36 +474,39 @@ export default {
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
workOrderButton: [],
|
||||
processFlowList: []
|
||||
processFlowList: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
workOrderId(newValue, oldValue) {
|
||||
this.activeName = 'produce'
|
||||
this.init(newValue)
|
||||
this.dataForm.id = newValue
|
||||
}
|
||||
this.activeName = 'produce';
|
||||
this.init(newValue);
|
||||
this.dataForm.id = newValue;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
this.getDict();
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.woIdString && this.$route.query.woIdString !== 'undefined') {
|
||||
const idList = this.$route.query.woIdString.split(',')
|
||||
if (
|
||||
this.$route.query.woIdString &&
|
||||
this.$route.query.woIdString !== 'undefined'
|
||||
) {
|
||||
const idList = this.$route.query.woIdString.split(',');
|
||||
console.log(idList);
|
||||
|
||||
getCoreWOListById(idList).then(res => {
|
||||
this.workOrderButton = res.data.map(work => {
|
||||
getCoreWOListById(idList).then((res) => {
|
||||
this.workOrderButton = res.data.map((work) => {
|
||||
return {
|
||||
id: work.id,
|
||||
name: work.name
|
||||
}
|
||||
})
|
||||
name: work.name,
|
||||
};
|
||||
});
|
||||
console.log('this.workOrderButton======', this.workOrderButton);
|
||||
this.init(this.workOrderButton[0].id, true)
|
||||
})
|
||||
this.init(this.workOrderButton[0].id, true);
|
||||
});
|
||||
} else {
|
||||
this.init(this.$route.query.id, true)
|
||||
this.init(this.$route.query.id, true);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -357,7 +514,7 @@ export default {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
getId(val) {
|
||||
this.workOrderId = val
|
||||
this.workOrderId = val;
|
||||
},
|
||||
async switchTab(val) {
|
||||
if (this.activeName === 'order') {
|
||||
@ -378,26 +535,27 @@ export default {
|
||||
getOrderEnergyData({
|
||||
workOrderId: this.dataForm.id,
|
||||
}).then((response) => {
|
||||
this.energyList = response.data
|
||||
this.chartData = response.data
|
||||
this.energyList = response.data;
|
||||
this.chartData = response.data;
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
} else if (this.activeName === 'quality') {
|
||||
this.allSumScrap = 0
|
||||
const {
|
||||
data: { data, otherList, otherMap, nameData },
|
||||
} = await getStatisticalDataPage({
|
||||
workOrderIdList:[this.dataForm,id]
|
||||
})
|
||||
workOrderId:this.dataForm.id
|
||||
});
|
||||
// console.log(this.queryParams);
|
||||
this.dynamicProps = this.filterNameData(nameData)
|
||||
this.dynamicProps = this.filterNameData(nameData);
|
||||
this.qualityList = this.filterData(data);
|
||||
}
|
||||
},
|
||||
getDict() {
|
||||
// 工艺
|
||||
getProcessFlowList().then(res => {
|
||||
this.processFlowList = res.data || []
|
||||
})
|
||||
getProcessFlowList().then((res) => {
|
||||
this.processFlowList = res.data || [];
|
||||
});
|
||||
},
|
||||
filterNameData(nameData) {
|
||||
const ndSet = new Set();
|
||||
@ -418,12 +576,14 @@ export default {
|
||||
innerData.map((d) => {
|
||||
keyValuePairs[d.dynamicName] = d.dynamicValue;
|
||||
});
|
||||
this.allSumScrap +=item.sumScrap
|
||||
return {
|
||||
inspectionContent: item.inspectionContent,
|
||||
...keyValuePairs,
|
||||
sumInput: item.sumInput,
|
||||
sumScrap: item.sumScrap,
|
||||
productionName: item.productionName,
|
||||
workOrderId: item.workOrderId,
|
||||
workOrderName: item.workOrderName,
|
||||
scrapRatio: item.scrapRatio,
|
||||
};
|
||||
});
|
||||
@ -431,26 +591,26 @@ export default {
|
||||
fitlerP(val) {
|
||||
if (val) {
|
||||
if (val === 1) {
|
||||
return '低'
|
||||
return '低';
|
||||
} else if (val === 2) {
|
||||
return '正常'
|
||||
return '正常';
|
||||
} else {
|
||||
return '高'
|
||||
return '高';
|
||||
}
|
||||
}
|
||||
},
|
||||
fitlerS(val) {
|
||||
if (val) {
|
||||
if (val === 1) {
|
||||
return '等待'
|
||||
return '等待';
|
||||
} else if (val === 2) {
|
||||
return '激活'
|
||||
return '激活';
|
||||
} else if (val === 3) {
|
||||
return '暂停'
|
||||
return '暂停';
|
||||
} else if (val === 4) {
|
||||
return '完成'
|
||||
return '完成';
|
||||
} else {
|
||||
return '作废'
|
||||
return '作废';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -491,11 +651,11 @@ export default {
|
||||
}
|
||||
},
|
||||
toggleTab(val) {
|
||||
this.activeModule = val
|
||||
this.activeModule = val;
|
||||
if (this.activeModule === 'barChart') {
|
||||
this.$nextTick((res) => {
|
||||
this.$refs.orderEnergyChart.getChart()
|
||||
})
|
||||
this.$refs.orderEnergyChart.getChart();
|
||||
});
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
@ -524,17 +684,19 @@ export default {
|
||||
this.visible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取工单详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data
|
||||
this.urlOptions.infoURL(id).then((response) => {
|
||||
this.dataForm = response.data;
|
||||
// 工艺名称
|
||||
if (this.dataForm.processFlowId) {
|
||||
this.processFlowList.filter(item => {
|
||||
if (item.id === this.dataForm.processFlowId) {
|
||||
this.dataForm.processFlowName = item.name
|
||||
if (this.dataForm.productLineIds.length>0) {
|
||||
console.log(this.processFlowList)
|
||||
this.dataForm.productLineIds.forEach(item=>{
|
||||
this.processFlowList.filter(item1 => {
|
||||
if (item1.id === item.processId) {
|
||||
item.processFlowName = item1.name
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
// 获取订单列表和用料列表
|
||||
@ -542,7 +704,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
this.getCode();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -556,8 +718,8 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@ -577,7 +739,6 @@ export default {
|
||||
color: rgba(102, 102, 102, 0.75);
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
@ -606,7 +767,7 @@ export default {
|
||||
|
||||
.active {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
border-bottom-color: #0B58FF;
|
||||
border-bottom-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
@ -51,11 +50,9 @@ import codeFilter from '@/mixins/code-filter';
|
||||
import {
|
||||
deleteWarehouseArea,
|
||||
getWarehouseAreaPage,
|
||||
getWarehouseAreaListAll
|
||||
} from "@/api/warehouse/warehouse-area-setup";
|
||||
import {
|
||||
getWarehouseList
|
||||
} from "@/api/warehouse/warehouse-setup";
|
||||
getWarehouseAreaListAll,
|
||||
} from '@/api/warehouse/warehouse-area-setup';
|
||||
import { getWarehouseList } from '@/api/warehouse/warehouse-setup';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
|
||||
const tableProps = [
|
||||
@ -129,7 +126,9 @@ export default {
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('warehouse:warehouse-area-setup:create')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
@ -180,6 +179,22 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
getWarehouseAreaListAll().then((response) => { //刷新搜索框库区
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
});
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
if (response.hasOwnProperty('data')) {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-21 10:26:21
|
||||
* @LastEditTime: 2024-12-16 16:30:12
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -204,13 +204,17 @@ export default {
|
||||
},
|
||||
created() {
|
||||
getWarehouseList().then((response) => {
|
||||
this.warehouseArr = response.data;
|
||||
this.warehouseArr = response.data.filter((item) =>
|
||||
item.type === 1
|
||||
);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getAreaList() {
|
||||
getWarehouseAreaList(this.dataForm.warehouseId).then((response) => {
|
||||
this.areaArr = response.data;
|
||||
this.dataForm.areaId = null
|
||||
this.dataForm.areaType = null
|
||||
if (this.areaArr.length === 0) {
|
||||
this.$message('该仓库下暂无库区');
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2024-08-02 16:26:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-08 16:38:53
|
||||
* @LastEditTime: 2024-12-19 14:15:06
|
||||
* @Description:,
|
||||
-->
|
||||
<template>
|
||||
@ -103,7 +103,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
getUserProfile().then((response) => {
|
||||
this.dataForm.operator = response.data.username;
|
||||
this.dataForm.operator = response.data.nickname;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
@ -67,6 +67,14 @@ const tableProps = [
|
||||
prop: 'warehouseName',
|
||||
label: '仓库名称',
|
||||
},
|
||||
{
|
||||
prop: 'areaName',
|
||||
label: '库区名称',
|
||||
},
|
||||
{
|
||||
prop: 'areaType',
|
||||
label: '库区类型',
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '库位名称',
|
||||
@ -95,6 +103,10 @@ const tableProps = [
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'goodsName',
|
||||
label: '物品名称',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
|
@ -18,7 +18,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="90"
|
||||
label="库位详情"
|
||||
label="详情"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
@ -70,10 +70,12 @@ const tableProps = [
|
||||
{
|
||||
prop: 'oldCode',
|
||||
label: '源库位编码',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'palletCode',
|
||||
label: '移动托盘编码',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'goodName',
|
||||
|
Loading…
Reference in New Issue
Block a user