24h,设备
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-04 17:57:18
|
||||
* @LastEditTime: 2023-11-15 10:32:19
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -326,9 +326,15 @@ export default {
|
||||
// 获取产品详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data
|
||||
this.dataForm.unit = String(this.dataForm.unit)
|
||||
this.dataForm.materialType = String(this.dataForm.materialType)
|
||||
this.dataForm.productType = String(this.dataForm.productType)
|
||||
if (this.dataForm.unit !== undefined) {
|
||||
this.dataForm.unit = String(this.dataForm.unit)
|
||||
}
|
||||
if (this.dataForm.materialType !== undefined) {
|
||||
this.dataForm.materialType = String(this.dataForm.materialType)
|
||||
}
|
||||
if (this.dataForm.productType !== undefined) {
|
||||
this.dataForm.productType = String(this.dataForm.productType)
|
||||
}
|
||||
});
|
||||
// 获取产品属性列表
|
||||
this.getList();
|
||||
|
||||
@@ -45,6 +45,8 @@ import {
|
||||
getCorePLPage,
|
||||
deleteCorePL
|
||||
} from '@/api/base/coreProductionLine';
|
||||
import { getStatus } from '@/api/core/base/productionLine';
|
||||
import codeFilter from '../../core/mixins/code-filter';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@@ -67,7 +69,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'enabled',
|
||||
label: '当前状态',
|
||||
filter: (val) => ['停用', '启用'][val]
|
||||
filter: codeFilter('lineStatus')
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
@@ -135,14 +137,28 @@ export default {
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
// getDataList() {
|
||||
// this.dataListLoading = true;
|
||||
// this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
// this.tableData = response.data.list;
|
||||
// this.listQuery.total = response.data.total;
|
||||
// this.dataListLoading = false;
|
||||
// });
|
||||
// },
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||
// this.tableData = response.data.list;
|
||||
this.getStatus(response.data.list)
|
||||
this.listQuery.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
getStatus(list) {
|
||||
const ids = list.map((i) => {
|
||||
return i.id;
|
||||
});
|
||||
getStatus(ids).then((response) => {
|
||||
response.forEach((a) => {
|
||||
list.forEach((b) => {
|
||||
if (b.id === a.id) b.enabled = a.status;
|
||||
});
|
||||
});
|
||||
this.tableData = list;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
|
||||
@@ -2,22 +2,26 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-06 17:08:22
|
||||
* @LastEditTime: 2023-11-15 14:18:38
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
<!-- <el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
size="50%"> -->
|
||||
<div class="app-container">
|
||||
<!-- <small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
</small-title> -->
|
||||
<div v-show="workOrderButton.length">
|
||||
<el-button v-for="(work, index) in workOrderButton" :key="index" type="primary" @click="init(work.id, true)">{{ work.name }}</el-button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h2>工单编码:{{ dataForm.code }}</h2>
|
||||
<h1>工单编码:{{ dataForm.code }}</h1>
|
||||
</div>
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
@@ -47,6 +51,9 @@
|
||||
<el-col :span="8">关联产线:{{ dataForm.productLineNames }}</el-col>
|
||||
<el-col :span="8">物料计算方式:{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' : '' }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">关联工艺:{{ dataForm.processFlowName }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<small-title
|
||||
@@ -57,7 +64,7 @@
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">订单创建时间:
|
||||
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px">{{ item.createTime }}</span>
|
||||
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px; white-space: normal">{{ item.createTime }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">计划开始时间:{{ dataForm.planStartTime }}</el-col>
|
||||
<el-col :span="8">计划完成时间:{{ dataForm.planFinishTime }}</el-col>
|
||||
@@ -74,7 +81,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">废片数量:{{ dataForm.nokQuantity }}</el-col>
|
||||
<el-col :span="8">检测瑕疵数:{{ 0 }}</el-col>
|
||||
<el-col :span="8">检测瑕疵数:{{ }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@@ -126,17 +133,18 @@
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<!-- <div class="drawer-body__footer">
|
||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getCoreWO, getMaterialBomPage, getConOrderList } from "@/api/base/coreWorkOrder";
|
||||
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
|
||||
import { orderList } from "@/api/base/orderManage";
|
||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { publicFormatter } from "@/utils/dict";
|
||||
|
||||
@@ -217,10 +225,36 @@ export default {
|
||||
orderArray: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
workOrderButton: [],
|
||||
processFlowList: []
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.woIdString) {
|
||||
const idList = this.$route.query.woIdString.split(',')
|
||||
getCoreWOListById(idList).then(res => {
|
||||
this.workOrderButton = res.data.map(work => {
|
||||
return {
|
||||
id: work.id,
|
||||
name: work.name
|
||||
}
|
||||
})
|
||||
this.init(this.workOrderButton[0].id, true)
|
||||
})
|
||||
} else {
|
||||
this.init(this.$route.query.id, true)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDict() {
|
||||
// 工艺
|
||||
getProcessFlowList().then(res => {
|
||||
this.processFlowList = res.data || []
|
||||
})
|
||||
},
|
||||
fitlerP(val) {
|
||||
if (val) {
|
||||
if (val === 1) {
|
||||
@@ -320,6 +354,14 @@ export default {
|
||||
// 获取工单详情
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取订单列表和用料列表
|
||||
this.getList();
|
||||
});
|
||||
@@ -401,6 +443,7 @@ export default {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
|
||||
@@ -40,17 +40,17 @@
|
||||
ref="material"
|
||||
@refreshDataList="closeDetail"></add-or-update>
|
||||
<!-- 查看详情 -->
|
||||
<detail
|
||||
<!-- <detail
|
||||
v-if="detailVisible"
|
||||
ref="detail"
|
||||
@refreshDataList="closeDetail"></detail>
|
||||
@refreshDataList="closeDetail"></detail> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import AddWorkOrder from './addWorkOrder'
|
||||
import Detail from './detail.vue';
|
||||
// import Detail from './detail.vue';
|
||||
import basicPage from '../../core/mixins/basic-page';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import {
|
||||
@@ -112,8 +112,7 @@ export default {
|
||||
mixins: [basicPage],
|
||||
components: {
|
||||
AddWorkOrder,
|
||||
AddOrUpdate,
|
||||
Detail
|
||||
AddOrUpdate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -252,7 +251,8 @@ export default {
|
||||
type: 'input',
|
||||
label: '工单名称',
|
||||
placeholder: '工单名称',
|
||||
param: 'name'
|
||||
param: 'name',
|
||||
defaultSelect: ''
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@@ -298,7 +298,14 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
console.log(this.$route.query.workOrderName)
|
||||
if (this.$route.query.workOrderName) {
|
||||
this.listQuery.name = this.$route.query.workOrderName;
|
||||
this.formConfig[0].defaultSelect = this.$route.query.workOrderName;
|
||||
}
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
refreshWorkOrder(val) {
|
||||
console.log(val)
|
||||
@@ -322,11 +329,17 @@ export default {
|
||||
this.$refs.material.init(val.data, true);
|
||||
});
|
||||
} else if (val.type === 'detail') {
|
||||
this.detailVisible = true;
|
||||
this.addOrEditTitle = "详情";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.detail.init(val.data.id, true);
|
||||
});
|
||||
this.$router.push({
|
||||
path: '/core/core-work-order-detail',
|
||||
query:{
|
||||
id: val.data.id
|
||||
}
|
||||
});
|
||||
// this.detailVisible = true;
|
||||
// this.addOrEditTitle = "详情";
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.detail.init(val.data.id, true);
|
||||
// });
|
||||
} else {
|
||||
const param = {
|
||||
id: val.data.id,
|
||||
|
||||
Reference in New Issue
Block a user