Compare commits
12 Commits
0ae68aacef
...
6a10afd04e
Author | SHA1 | Date | |
---|---|---|---|
6a10afd04e | |||
d0cb4d383e | |||
|
4ce62c14ee | ||
|
e5966c27a3 | ||
3e9f629888 | |||
|
ecabeeeea9 | ||
3da077bdf3 | |||
|
aef062b4c9 | ||
|
952490f0d4 | ||
51d6ce5dbb | |||
2ab686a797 | |||
887390cf91 |
8
.env.dev
8
.env.dev
@ -1,8 +1,8 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2023-11-15 09:09:12
|
||||
# @LastEditors: zhp
|
||||
# @LastEditTime: 2023-11-15 17:25:58
|
||||
# @LastEditors: DY
|
||||
# @Description:
|
||||
###
|
||||
# 开发环境配置
|
||||
@ -13,12 +13,12 @@ VUE_APP_TITLE = MES系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
||||
VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||
# 路由懒加载
|
||||
|
68
src/api/base/coreHotMaterial.js
Normal file
68
src/api/base/coreHotMaterial.js
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-15 15:56:14
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建原料
|
||||
export function createHotMaterial(data) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新原料
|
||||
export function updateHotMaterial(data) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除原料
|
||||
export function deleteHotMaterial(id) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原料
|
||||
export function getHotMaterial(id) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原料code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/base/core-hot-material/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得原料分页
|
||||
export function getHotMaterialPage(query) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得所有列表
|
||||
export function getHotMaterialList(query) {
|
||||
return request({
|
||||
url: '/base/core-hot-material/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-10-21 11:50:46
|
||||
* @LastEditTime: 2023-11-06 17:49:42
|
||||
* @LastEditTime: 2023-11-15 17:19:19
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@ -67,6 +67,14 @@ export function getCoreWOList(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 根据工单id获得所有列表
|
||||
export function getCoreWOListById(ids) {
|
||||
return request({
|
||||
url: '/base/core-work-order/list?ids='+ ids ,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 创建工单预使用原料
|
||||
export function createCoreWOMa(data) {
|
||||
return request({
|
||||
@ -136,3 +144,12 @@ export function statusChange(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 创建分配产量
|
||||
export function createConCoreWOr(data) {
|
||||
return request({
|
||||
url: '/base/core-order-con-work-order/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-08 15:56:52
|
||||
* @LastEditTime: 2023-11-11 19:52:54
|
||||
* @LastEditTime: 2023-11-13 09:15:17
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-08 15:56:52
|
||||
* @LastEditTime: 2023-11-10 09:04:50
|
||||
* @LastEditTime: 2023-11-13 08:52:12
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@ -58,10 +58,10 @@ export function getCheckDetPage(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得x巡检所有列表
|
||||
// 获得设备巡检所有列表
|
||||
export function getcheckList(query) {
|
||||
return request({
|
||||
url: '/base/equipment-check/list',
|
||||
url: '/base/equipment-check/listAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
@ -15,9 +15,9 @@
|
||||
</el-row>
|
||||
|
||||
<el-row class="container-main flex-col" type="flex">
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }">
|
||||
<el-col :span="8">
|
||||
<el-row >
|
||||
<el-row>
|
||||
<el-col :span="8" :style="{ padding: '0 ' + 8 + 'px' }">
|
||||
<el-row>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<base-container :beilv="1" :height="460" :title="'切割数据'" :title-icon="'1_1'">
|
||||
<!-- <div style="width:100%">
|
||||
@ -26,7 +26,7 @@
|
||||
<p class="now-team-content" style="margin:0">{{ exceptionAlarm.total }}</p>
|
||||
</el-row>
|
||||
</div> -->
|
||||
<base-table1 :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inciseTableProps"
|
||||
<base-table1 :page="1" :limit="10" :show-index="false" :beilv="1" :table-config="inciseTableProps"
|
||||
:table-data="inciseList" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
@ -34,16 +34,16 @@
|
||||
<!-- 各产线投入数量和产出 -->
|
||||
<base-container :beilv="1" :height="180" :title="'缺陷数据'" :title-icon="'1_3'">
|
||||
<!-- <top-radio-group :data-type="0" @change-time-range="handleChangeChartTable3" /> -->
|
||||
<base-table :page="1" :limit="10" :beilv="1" :table-config="qualityTableProps"
|
||||
<base-table :page="1" :limit="10" :show-index="false" :beilv="1" :table-config="qualityTableProps"
|
||||
:table-data="qualityList" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="16">
|
||||
<el-col :span="16" :style="{ padding: '0 ' + 8 + 'px' }">
|
||||
<!-- 中间栏 -->
|
||||
<el-row >
|
||||
<el-row>
|
||||
<el-col>
|
||||
<!-- 各产线投入数量折线展示 -->
|
||||
<el-row>
|
||||
@ -74,7 +74,7 @@
|
||||
<el-row>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<base-container1 :beilv="1" :title="'下片数量统计'" :title-icon="'1_5'">
|
||||
<linear-bar-chart :id=" 'NumCharts' " :name-list="NumList" :data-list="NumDataList" :height="225"
|
||||
<linear-bar-chart :id=" 'NumCharts' " :name-list="NumList" :data-list="NumDataList" :height="235"
|
||||
:beilv="1" :show-legend="true" />
|
||||
</base-container1>
|
||||
<!-- <base-container :beilv="1" :title="'成品率折线展示'" :title-icon="'1_6'">
|
||||
@ -497,11 +497,11 @@ const qualityList = [
|
||||
{ createTime: '10:30:49', content: '报废', productLine: '钢五线', process: '包装' },
|
||||
{ createTime: '10:40:35', content: '报废', productLine: '钢六线', process: '钢化' },
|
||||
{ createTime: '10:31:35', content: '报废', productLine: '钢七线', process: '包装' },
|
||||
// { createTime: '10:32:35', content: '报废', productLine: '钢八线', process: '钢化' },
|
||||
// { createTime: '10:33:35', content: '报废', productLine: '钢一线', process: '磨边' },
|
||||
// { createTime: '10:34:35', content: '报废', productLine: '钢二线', process: '镀膜' },
|
||||
// { createTime: '10:38:35', content: '报废', productLine: '钢三线', process: '钢化' }
|
||||
// { createTime: '10:31:35', content: '报废', productLine: '钢四线', process: '镀膜' },
|
||||
{ createTime: '10:32:35', content: '报废', productLine: '钢八线', process: '钢化' },
|
||||
{ createTime: '10:33:35', content: '报废', productLine: '钢一线', process: '磨边' },
|
||||
{ createTime: '10:34:35', content: '报废', productLine: '钢二线', process: '镀膜' },
|
||||
{ createTime: '10:38:35', content: '报废', productLine: '钢三线', process: '钢化' },
|
||||
{ createTime: '10:31:35', content: '报废', productLine: '钢四线', process: '镀膜' },
|
||||
// { createTime: '10:43:35', content: '报废', productLine: '钢五线', process: '镀膜' },
|
||||
// { createTime: '10:43:35', content: '报废', productLine: '钢五线', process: '镀膜' },
|
||||
// { createTime: '10:43:35', content: '报废', productLine: '钢五线', process: '镀膜' },
|
||||
@ -538,6 +538,7 @@ const inciseList = [
|
||||
{ finishNum: '43423', scrapNum: '14', area: '12235.24' },
|
||||
{ finishNum: '32343', scrapNum: '15', area: '12345.24' },
|
||||
{ finishNum: '43434', scrapNum: '18', area: '12455.24' },
|
||||
{ finishNum: '43432', scrapNum: '19', area: '12345.24' },
|
||||
{ finishNum: '43432', scrapNum: '19', area: '12345.24' }
|
||||
]
|
||||
export default {
|
||||
@ -1020,7 +1021,7 @@ export default {
|
||||
top: 2em;
|
||||
}
|
||||
.container-main {
|
||||
padding: 10px;
|
||||
// padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1123,7 +1124,7 @@ export default {
|
||||
flex: 1 1;
|
||||
}
|
||||
.h-full {
|
||||
height: calc(100vh - 150px);
|
||||
height: calc(100vh);
|
||||
}
|
||||
/* .container-main {
|
||||
min-height: calc(100vh - 10em);
|
||||
|
86
src/views/base/coreHotMaterial/add-or-updata.vue
Normal file
86
src/views/base/coreHotMaterial/add-or-updata.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-15 16:23:49
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原料名称" prop="name">
|
||||
<el-input v-model="dataForm.name" clearable placeholder="请输入原料名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原料编号" prop="code">
|
||||
<el-input v-model="dataForm.code" clearable placeholder="请输入原料编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="每日消耗量" prop="dailyCost">
|
||||
<el-input-number v-model="dataForm.dailyCost" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-select
|
||||
v-model="dataForm.unit"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择单位">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas('unit_dict')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode } from "@/api/base/coreHotMaterial";
|
||||
import { getDictDatas} from "@/utils/dict";
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getCode,
|
||||
createURL: createHotMaterial,
|
||||
updateURL: updateHotMaterial,
|
||||
infoURL: getHotMaterial,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
name: undefined,
|
||||
unit: undefined,
|
||||
dailyCost: undefined
|
||||
},
|
||||
departmentlList: [],
|
||||
menuOptions: [],
|
||||
dataRule: {
|
||||
code: [{ required: true, message: "原料编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "原料名称不能为空", trigger: "blur" }]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
178
src/views/base/coreHotMaterial/index.vue
Normal file
178
src/views/base/coreHotMaterial/index.vue
Normal file
@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"></add-or-update>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '../../core/mixins/basic-page';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getHotMaterialPage, deleteHotMaterial } from '@/api/base/coreHotMaterial';
|
||||
import { publicFormatter } from "@/utils/dict";
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '原料名称'
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '原料编码'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
filter: publicFormatter('unit_dict')
|
||||
},
|
||||
{
|
||||
prop: 'dailyCost',
|
||||
label: '每日消耗量'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getHotMaterialPage,
|
||||
deleteURL: deleteHotMaterial
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:core-hot-material:update`)
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`base:core-hot-material:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
].filter((v)=>v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '原料名称',
|
||||
placeholder: '原料名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '原料编码',
|
||||
placeholder: '原料编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:core-hot-material:create') ? 'button' : '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
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;
|
||||
// });
|
||||
// },
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name ? val.name : undefined;
|
||||
this.listQuery.code = val.code ? val.code : undefined;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -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 15:41:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -11,7 +11,7 @@
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="50%">
|
||||
size="60%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
@ -25,12 +25,12 @@
|
||||
label-width="100px"
|
||||
label-position="top">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
@ -39,9 +39,7 @@
|
||||
placeholder="请输入产品编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料类型" prop="materialType">
|
||||
<el-select
|
||||
v-model="dataForm.materialType"
|
||||
@ -57,7 +55,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品类型" prop="productType">
|
||||
<el-select
|
||||
v-model="dataForm.productType"
|
||||
@ -73,9 +73,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-select
|
||||
v-model="dataForm.unit"
|
||||
@ -91,31 +89,34 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位平方数" prop="area">
|
||||
<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="specifications">
|
||||
<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产线生产单位用时(S)" prop="processTime">
|
||||
<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button v-if="!idAttrShow" @click="goback()">取消</el-button>
|
||||
<el-button v-else :disabled="isdetail" @click="init(dataForm.id)">重置</el-button>
|
||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button>
|
||||
@ -326,9 +327,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();
|
||||
@ -353,7 +360,31 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.idAttrShow = true
|
||||
// this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -382,7 +413,7 @@ export default {
|
||||
|
||||
.drawer >>> .content {
|
||||
padding: 30px 24px;
|
||||
flex: 1;
|
||||
/* flex: 1; */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* height: 100%; */
|
||||
@ -408,7 +439,7 @@ export default {
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
margin: 5px 15px;
|
||||
margin: -32px 15px 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.add {
|
||||
|
@ -26,7 +26,7 @@
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit" />
|
||||
@refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -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':
|
||||
|
@ -70,7 +70,7 @@
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="关联工艺" prop="processFlowId">
|
||||
<el-select v-model="dataForm.processFlowId" placeholder="请选择" style="width: 100%;">
|
||||
<el-select v-model="dataForm.processFlowId" placeholder="请选择工艺" clearable filterable style="width: 100%;" @change="processFlowIdChange">
|
||||
<el-option
|
||||
v-for="item in processFlowList"
|
||||
:key="item.id"
|
||||
@ -82,7 +82,7 @@
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||
<el-radio-group v-model="dataForm.materialMethod">
|
||||
<el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
|
||||
<el-radio :label="1">产品基础</el-radio>
|
||||
<el-radio :label="2">工艺扩展</el-radio>
|
||||
</el-radio-group>
|
||||
@ -192,8 +192,8 @@ export default {
|
||||
processFlowList: [],
|
||||
productLineList: [],
|
||||
workOrderTypeList: [
|
||||
{id: 1,name:'标准工单'},
|
||||
{id: 2, name:'特殊工单'}
|
||||
{id: 1,name:'普通'},
|
||||
{id: 2, name:'特殊'}
|
||||
],
|
||||
planStartTime: '',
|
||||
planFinishTime: '',
|
||||
@ -205,6 +205,20 @@ export default {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
// 工艺变更
|
||||
materialMethodChange(val) {
|
||||
if (val === 2 && !this.dataForm.processFlowId) {
|
||||
this.dataForm.materialMethod = 1
|
||||
this.$modal.msgError("请先选择关联工艺");
|
||||
}
|
||||
},
|
||||
// 工艺变更
|
||||
processFlowIdChange(val) {
|
||||
console.log(val)
|
||||
if (!val) {
|
||||
this.dataForm.materialMethod = 1
|
||||
}
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || "";
|
||||
this.visible = true;
|
||||
|
298
src/views/base/coreWorkOrder/allocation.vue
Normal file
298
src/views/base/coreWorkOrder/allocation.vue
Normal file
@ -0,0 +1,298 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-15 17:45:04
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="55%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ '分配产量' }}
|
||||
</small-title>
|
||||
<div class="content">
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
|
||||
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
|
||||
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" label="序号" />
|
||||
<el-table-column prop="orderName" label="订单名称" />
|
||||
<el-table-column prop="orderCode" label="订单编码" />
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.planAssignmentQuantity"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.actualAssignmentQuantity"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
||||
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#0B58FF'}"
|
||||
size="mini"
|
||||
@click="edit(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
|
||||
<!-- <el-tooltip placement="top" content="删除">
|
||||
<el-button
|
||||
type="text"
|
||||
:style="{color:'#FF5454'}"
|
||||
size="mini"
|
||||
@click="deleteDetail(scope.row)"
|
||||
>
|
||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
|
||||
</el-button>
|
||||
</el-tooltip> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" type="primary" @click="goback()">关闭</el-button>
|
||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <attr-add
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:material-id="dataForm.id"
|
||||
@refreshDataList="getList" /> -->
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
||||
import SmallTitle from '../material/SmallTitle';
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
// import attrAdd from './attr-add';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
components: { SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
infoURL: getCoreWO,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
productId: '',
|
||||
remark: undefined,
|
||||
},
|
||||
productList: [],
|
||||
materialAttrList: [],
|
||||
materialList: [],
|
||||
tableData: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
idAttrShow: false
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
initData() {
|
||||
// this.materialAttrList.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
},
|
||||
edit(row) {
|
||||
row.isEdit = true
|
||||
},
|
||||
saveData(row) {
|
||||
if (row.actualAssignmentQuantity) {
|
||||
if (row.id) {
|
||||
// updateMaterialPBDet({
|
||||
// ...row
|
||||
// }).then((response) => {
|
||||
// this.$modal.msgSuccess('修改成功');
|
||||
// // this.visible = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// return;
|
||||
}
|
||||
// 添加的提交
|
||||
createConCoreWOr({
|
||||
...row,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('分配成功');
|
||||
// this.visible = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.$message.warning('请填写实际分配数量');
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
// 获取产品Bom详细列表
|
||||
getConOrderList({
|
||||
...this.listQuery,
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.tableData = response.data.map(item => {
|
||||
item.isEdit = false
|
||||
return item
|
||||
});
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
// 构造一行
|
||||
// addRow() {
|
||||
// const row = {
|
||||
// bomId: this.dataForm.id,
|
||||
// materialId: '',
|
||||
// num: 0,
|
||||
// materialCode: undefined,
|
||||
// unit: undefined,
|
||||
// remark: '',
|
||||
// isEdit: true
|
||||
// }
|
||||
// this.tableData.push(row)
|
||||
// },
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || undefined;
|
||||
this.visible = true;
|
||||
// if (id) {
|
||||
// this.idAttrShow = true
|
||||
// } else {
|
||||
// this.idAttrShow = false
|
||||
// }
|
||||
|
||||
this.$nextTick(() => {
|
||||
// this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取工单详情
|
||||
this.urlOptions.infoURL(id).then(response => {
|
||||
this.dataForm = response.data;
|
||||
});
|
||||
// 获取工单订单明细
|
||||
this.getList();
|
||||
} else {}
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
// this.initData();
|
||||
},
|
||||
goEdit() {
|
||||
this.isdetail = false;
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
.drawer >>> .el-drawer__body {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .content {
|
||||
padding: 30px 24px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* height: 100%; */
|
||||
}
|
||||
|
||||
.drawer >>> .visual-part {
|
||||
flex: 1 auto;
|
||||
max-height: 30vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
.formContent {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
@ -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;
|
||||
|
@ -39,24 +39,25 @@
|
||||
v-if="materialVisible"
|
||||
ref="material"
|
||||
@refreshDataList="closeDetail"></add-or-update>
|
||||
<!-- 查看详情 -->
|
||||
<detail
|
||||
v-if="detailVisible"
|
||||
ref="detail"
|
||||
@refreshDataList="closeDetail"></detail>
|
||||
<!-- 分配产量 -->
|
||||
<allocation
|
||||
v-if="allocationVisible"
|
||||
ref="allocation"
|
||||
@refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import AddWorkOrder from './addWorkOrder'
|
||||
import Detail from './detail.vue';
|
||||
import Allocation from './allocation.vue';
|
||||
import basicPage from '../../core/mixins/basic-page';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import {
|
||||
getCoreWOPage,
|
||||
deleteCoreWO,
|
||||
statusChange
|
||||
statusChange,
|
||||
getConOrderList
|
||||
} from '@/api/base/coreWorkOrder';
|
||||
|
||||
|
||||
@ -113,7 +114,7 @@ export default {
|
||||
components: {
|
||||
AddWorkOrder,
|
||||
AddOrUpdate,
|
||||
Detail
|
||||
Allocation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -123,6 +124,7 @@ export default {
|
||||
},
|
||||
detailVisible: false,
|
||||
materialVisible: false,
|
||||
allocationVisible: false,
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||
@ -252,7 +254,8 @@ export default {
|
||||
type: 'input',
|
||||
label: '工单名称',
|
||||
placeholder: '工单名称',
|
||||
param: 'name'
|
||||
param: 'name',
|
||||
defaultSelect: ''
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@ -298,7 +301,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 +332,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,
|
||||
@ -346,18 +362,22 @@ export default {
|
||||
}
|
||||
console.log('22',val)
|
||||
this.$confirm(`确定对${'[工单名称=' + val.data.name + ']'}进行${val.type}操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
statusChange(param).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '暂停成功!',
|
||||
message: '操作成功!',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
// 分配产量
|
||||
if (param.status === 4) {
|
||||
this.allocationOrder(param);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
@ -365,6 +385,28 @@ export default {
|
||||
.catch(() => { });
|
||||
}
|
||||
},
|
||||
allocationOrder(val) {
|
||||
// 获取订单列表
|
||||
getConOrderList({
|
||||
workOrderId: val.id,
|
||||
}).then((response) => {
|
||||
if (response.data.length > 0) {
|
||||
this.$confirm('工单结束,可分配产量', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.allocationVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.allocation.init(val.id, true);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
|
@ -150,48 +150,37 @@ export default {
|
||||
getData() {
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||
//构造数据
|
||||
if (res.data) {
|
||||
this.tableData = []
|
||||
if (Object.values(res.data.coreProductionLineMonthVOS).length > 0) {
|
||||
this.setHeader()
|
||||
res.data.forEach(item => {
|
||||
console.log('111', item.recordTime, moment(item.recordTime).format('DD'))
|
||||
this.tableData.push({
|
||||
proName: item.proName,
|
||||
specifications: item.specifications
|
||||
let yAllData = [], proNameList = []
|
||||
Object.values(res.data.coreProductionLineMonthVOS).forEach(pro => {
|
||||
// 一条产品的数据
|
||||
let yData = []
|
||||
const tempData = {
|
||||
proName: pro[0].proName,
|
||||
specifications: pro[0].specifications,
|
||||
sum: 0
|
||||
}
|
||||
proNameList.push(pro[0].proName)
|
||||
pro.forEach(item => {
|
||||
// 产品下的各时间点的数据
|
||||
// 截取日
|
||||
const day = parseTime(item.recordTime).slice(8, 10) < 10 ? parseTime(item.recordTime).slice(9, 10) : parseTime(item.recordTime).slice(8, 10)
|
||||
// console.log('!1', day < 10)
|
||||
tempData['value' + day] = item.countSum
|
||||
tempData.sum += item.countSum
|
||||
yData[day] = item.countSum
|
||||
// yData.push(item.countSum)
|
||||
})
|
||||
this.tableData.push(tempData)
|
||||
yAllData.push(yData)
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$refs.lineChart.initChart(this.xData, yAllData, proNameList)
|
||||
})
|
||||
}
|
||||
console.log('饿', this.tableData)
|
||||
// res.data.data.forEach(item => {
|
||||
// let yData = []
|
||||
// lineName.push(item.lineName)
|
||||
// // let obj = {}
|
||||
// // obj.lineName = item.lineName,
|
||||
// // obj.sum = item.sum,
|
||||
// item.data.forEach((ele, index) => {
|
||||
// // console.log(ele)
|
||||
// ele.children.forEach((e) => {
|
||||
// // let yData = []
|
||||
// yData.push(e.dynamicValue)
|
||||
// })
|
||||
// })
|
||||
// yAllData.push(yData)
|
||||
// });
|
||||
// console.log(lineName)
|
||||
// } else {
|
||||
// this.tableProps = arr
|
||||
// this.tableData = []
|
||||
// xData = []
|
||||
// yAllData = []
|
||||
// lineName = []
|
||||
// }
|
||||
// res.data.data[0].data[0].children.forEach((item, index) => {
|
||||
// // console.log(item)
|
||||
// yData.push(item.dynamicValue)
|
||||
// // let data = 'data' + Number(index+1)
|
||||
// // obj['' + item.dynamicName + ''] = item.dynamicValue
|
||||
// })
|
||||
// console.log(this.yData)
|
||||
// this.$refs.lineChart.initChart(this.xData, yAllData, lineName)
|
||||
|
||||
// this.total = response.data.total;
|
||||
// this.dataListLoading = false;
|
||||
});
|
||||
|
@ -25,7 +25,7 @@
|
||||
<script>
|
||||
import { getPdlDataOneDay } from '@/api/core/monitoring/data24'
|
||||
import { parseTime } from '../../mixins/code-filter';
|
||||
import { Loading } from 'element-ui';
|
||||
import { getSchedulingMonitoringRecord } from '@/api/monitoring/teamProduction'
|
||||
|
||||
export default {
|
||||
name: 'productionLineData24',
|
||||
@ -48,6 +48,8 @@ export default {
|
||||
tableData: [],
|
||||
tableProps: [],
|
||||
spanInfo: {},
|
||||
monitorList: [],
|
||||
ResData: []
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
@ -56,7 +58,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/** 构建tableProps - 依据第一个元素所提供的信息 */
|
||||
buildProps() {
|
||||
async buildProps() {
|
||||
// 获取当前时间
|
||||
var currentTime = new Date();
|
||||
let timeArr = []
|
||||
@ -65,7 +67,6 @@ export default {
|
||||
for (let i = 0; i < 24; i ++) {
|
||||
timeArr.unshift(new Date(currentTime.getFullYear(), currentTime.getMonth(), currentTime.getDate(), currentTime.getHours() - i, 0, 0).getTime())
|
||||
}
|
||||
console.log("24小时内的开始时间:" + timeArr, timeArr.length);
|
||||
for(const times of timeArr) {
|
||||
const subprop = {
|
||||
label: parseTime(times),
|
||||
@ -73,7 +74,7 @@ export default {
|
||||
children: [
|
||||
{ prop: times + '_up', label: '上片数据' },
|
||||
{ prop: times + '_down', label: '下片数据' },
|
||||
{ prop: times + '_good', label: '良品面积' },
|
||||
{ prop: times + '_area', label: '良品面积' },
|
||||
{ prop: times + '_bad', label: '报废数据' },
|
||||
{ prop: times + '_percent', label: '报废比例(%)' }
|
||||
]
|
||||
@ -81,7 +82,13 @@ export default {
|
||||
this.arr.push(subprop)
|
||||
}
|
||||
this.tableProps = this.arr
|
||||
console.log('111', this.tableProps)
|
||||
const paramsTime = [parseTime(timeArr[0]), parseTime(timeArr[23])]
|
||||
await getSchedulingMonitoringRecord({checkTime: paramsTime}).then(res =>{
|
||||
// 报废数据
|
||||
this.monitorList = res.data.data
|
||||
console.log('报废', this.monitorList)
|
||||
this.buildData(this.ResData);
|
||||
})
|
||||
},
|
||||
setRowSpan(arr) {
|
||||
let count = 0
|
||||
@ -98,28 +105,47 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log('打印数组长度', this.spanArr)
|
||||
},
|
||||
|
||||
/** 把 list 里的数据转换成 tableProps 对应的格式 */
|
||||
convertList(list) {
|
||||
let sectionArr= []
|
||||
console.log('打印看下数据list', list)
|
||||
list.forEach((ele, index) => {
|
||||
let tempData = {}
|
||||
tempData[ele.recordTime + '_up'] = ele.inputNum
|
||||
tempData[ele.recordTime + '_down'] = ele.outputNum
|
||||
tempData[ele.recordTime + '_up'] = ele.inputNum
|
||||
tempData['proLineName'] = ele.lineName
|
||||
tempData['workOrderName'] = ele.workOrderName
|
||||
tempData['spec'] = ele.specifications
|
||||
this.tableData.push(tempData)
|
||||
console.log('看看数据', this.tableData, tempData)
|
||||
const { proLineName } = tempData
|
||||
sectionArr.push(proLineName)
|
||||
// let sectionArr= []
|
||||
let temp = Object.values(list.datamap)
|
||||
console.log('111', temp)
|
||||
|
||||
temp.forEach(item => {
|
||||
// 每条产线下的数据list
|
||||
console.log('22', item)
|
||||
let lineData = {}
|
||||
lineData['proLineName'] = item[0].lineName
|
||||
let works = [], specs = []
|
||||
item.forEach(it => {
|
||||
works.push(it.workOrderName)
|
||||
specs.push(it.specifications)
|
||||
lineData[it.recordTime + '_up'] = it.inputNum
|
||||
lineData[it.recordTime + '_down'] = it.outputNum
|
||||
lineData[it.recordTime + '_area'] = it.area
|
||||
})
|
||||
console.log('你好', this.monitorList)
|
||||
this.monitorList.forEach(m => {
|
||||
console.log('455', m)
|
||||
if (m.lineName === lineData.proLineName) {
|
||||
m.data.forEach(bad => {
|
||||
// 转成时间戳
|
||||
// console.log('233', Date.parse(bad.dynamicName))
|
||||
const stamp = Date.parse(bad.dynamicName)
|
||||
lineData[stamp + '_bad'] = bad.dynamicValue
|
||||
lineData[stamp + '_percent'] = (lineData[stamp + '_bad'] / lineData[stamp + '_down'] * 100).toFixed(2) + '%'
|
||||
})
|
||||
}
|
||||
})
|
||||
lineData['workOrderName'] = works.join(',')
|
||||
lineData['spec'] = specs.join(',')
|
||||
this.tableData.push(lineData)
|
||||
})
|
||||
this.setRowSpan(sectionArr)
|
||||
console.log('工段名称列表', sectionArr)
|
||||
console.log('打印', this.tableData)
|
||||
// this.setRowSpan(sectionArr)
|
||||
// console.log('工段名称列表', sectionArr)
|
||||
},
|
||||
|
||||
buildData(data) {
|
||||
@ -141,8 +167,9 @@ export default {
|
||||
},
|
||||
|
||||
async getList() {
|
||||
this.urlOptions.getDataListURL().then(res => {
|
||||
await this.urlOptions.getDataListURL().then(res => {
|
||||
console.log('看看数据', res)
|
||||
this.ResData = res.data
|
||||
this.arr = [
|
||||
{
|
||||
prop: 'proLineName',
|
||||
@ -164,7 +191,6 @@ export default {
|
||||
}
|
||||
]
|
||||
this.buildProps();
|
||||
this.buildData(res.data);
|
||||
})
|
||||
|
||||
// // const data = this.res.data;
|
||||
|
@ -29,7 +29,8 @@
|
||||
filterable
|
||||
:disabled="isdetail"
|
||||
style="width: 100%"
|
||||
placeholder="请选择设备名称">
|
||||
placeholder="请选择设备名称"
|
||||
@change="setConfig">
|
||||
<el-option
|
||||
v-for="dict in eqList"
|
||||
:key="dict.id"
|
||||
@ -78,7 +79,7 @@
|
||||
type="date"
|
||||
:disabled="isdetail"
|
||||
format='yyyy-MM-dd'
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="timestamp"
|
||||
placeholder="选择巡检时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -202,6 +203,13 @@ export default {
|
||||
const configres = await getcheckConfigByEqList()
|
||||
this.configList = configres.data
|
||||
},
|
||||
async setConfig() {
|
||||
const configres = await getcheckConfigByEqList({equipmentId: this.dataForm.equipmentId})
|
||||
this.configList = configres.data
|
||||
this.dataForm.equipmentCode = this.eqList.filter(item => {
|
||||
return item.id === this.dataForm.equipmentId
|
||||
})[0].code
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
@ -226,7 +234,7 @@ export default {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取备品备件
|
||||
// 获取巡检记录
|
||||
getEqCheckLog(this.dataForm.id).then(response => {
|
||||
this.formLoading = false
|
||||
this.dataForm = response.data;
|
||||
|
@ -58,6 +58,7 @@ import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import addRecord from './addRecord.vue';
|
||||
import { exportCheckLogExcel } from '@/api/equipment/base/inspection/record'
|
||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||
|
||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
@ -90,13 +91,13 @@ export default {
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'repairOrderNumber', label: '配置名称' },
|
||||
{ prop: 'maintenanceDuration', label: '设备名称' },
|
||||
{ prop: 'lineName', label: '数据来源' },
|
||||
{ prop: 'sectionName', label: '计划巡检时间' },
|
||||
{ prop: 'equipmentName', label: '实际巡检时间' },
|
||||
{ prop: 'maintenanceDetail', label: '完成状态' },
|
||||
{ prop: 'repairman', label: '巡检人' },
|
||||
{ prop: 'configName', label: '配置名称' },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
// { prop: 'lineName', label: '数据来源' },
|
||||
// { prop: 'sectionName', label: '计划巡检时间' },
|
||||
{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
|
||||
// { prop: 'maintenanceDetail', label: '完成状态' },
|
||||
{ prop: 'responsible', label: '巡检人' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@ -222,7 +223,7 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
basePath: '/base/equipment-repair-log',
|
||||
basePath: '/base/equipment-check-log',
|
||||
mode: null,
|
||||
};
|
||||
},
|
||||
|
@ -202,7 +202,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init(data, param) {
|
||||
this.form.orderId = data.id
|
||||
this.form.orderId = data
|
||||
this.getList()
|
||||
if (param === 'add') {
|
||||
this.isBind = false
|
||||
|
Loading…
Reference in New Issue
Block a user