Compare commits
42 Commits
319e0ac90d
...
projects/m
| Author | SHA1 | Date | |
|---|---|---|---|
| ceeb853783 | |||
| 6ed21030f5 | |||
| 73feff0d8b | |||
| d49a698136 | |||
| 6e774dfc5d | |||
| 3eeded056f | |||
| 881eace12f | |||
| dad3b2da95 | |||
| f5cfc5d2bb | |||
| 235b0a6512 | |||
| 13bf1e0fd0 | |||
|
|
97acb4faac | ||
|
|
04a5359eda | ||
| 7ae7dfad95 | |||
| e202ac542e | |||
| eb8736178a | |||
| 580a66549c | |||
| 30c45e6f74 | |||
| e9c2917c77 | |||
| 0a9bd0c6de | |||
| 84dbd8d5b2 | |||
|
|
00f54f3de6 | ||
|
|
f26d7abc64 | ||
| 028c14a174 | |||
| b14abd39b6 | |||
| dfc8110410 | |||
| baede9ef34 | |||
| 2c44906bd6 | |||
| 466c822b0f | |||
| 031e3098b7 | |||
| d14dae86fc | |||
| 492b591fa9 | |||
| fc20e275f7 | |||
| 10fd959c9d | |||
| 342e83ab41 | |||
| df530abb90 | |||
| 8f1e5212e3 | |||
|
|
5dd299e549 | ||
|
|
511a00d0a3 | ||
| d5b71c4d7d | |||
|
|
43d0a2668d | ||
| a492fe4c87 |
2
.env.dev
2
.env.dev
@@ -18,7 +18,7 @@ VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
|
|||||||
|
|
||||||
|
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
VUE_APP_JIMU_API = 'http://mes2.kszny.picaiba.com'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"local": "vue-cli-service serve --mode local",
|
"local": "vue-cli-service serve --mode local",
|
||||||
"dev": "vue-cli-service serve --mode dev",
|
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode dev",
|
||||||
"front": "vue-cli-service serve --mode front",
|
"front": "vue-cli-service serve --mode front",
|
||||||
"build:prod": "vue-cli-service build --mode prod",
|
"build:prod": "vue-cli-service build --mode prod",
|
||||||
"build:stage": "vue-cli-service build --mode stage",
|
"build:stage": "vue-cli-service build --mode stage",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @Date: 2023-10-21 11:50:46
|
* @Date: 2023-10-21 11:50:46
|
||||||
* @LastEditTime: 2023-10-30 14:37:28
|
* @LastEditTime: 2023-10-30 14:37:28
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
@@ -65,4 +65,11 @@ export function getCoreDepartmentList(query) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getDepartmentList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dept/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-10-21 11:50:46
|
* @Date: 2023-10-21 11:50:46
|
||||||
* @LastEditTime: 2023-11-15 17:19:19
|
* @LastEditTime: 2024-12-27 15:20:14
|
||||||
* @LastEditors: DY
|
* @LastEditors: zwq
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
@@ -161,3 +161,20 @@ export function createConCoreWOr(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新分配产量
|
||||||
|
export function updateBatch(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-order-con-work-order/updateBatch',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新订单表与工单关联表 多对多
|
||||||
|
export function updateConCoreWOr(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-order-con-work-order/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ export function createGroupRule(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 作废排班规则
|
||||||
|
export function disableGroupRule(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/group-scheduling-rule/disable?id=' + id,
|
||||||
|
method: 'post',
|
||||||
|
})
|
||||||
|
}
|
||||||
// 更新排班规则基础信息
|
// 更新排班规则基础信息
|
||||||
export function updateGroupRule(data) {
|
export function updateGroupRule(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
// 获得产品列表
|
// 获得物料列表(包括产品)
|
||||||
export function getProductAll() {
|
export function getProductAll() {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/core-product-material/listAll',
|
url: '/base/core-product-material/listAll',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获得产品列表
|
||||||
|
export function getProductList() {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-product-material/listAllProduct',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,6 @@
|
|||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2024-07-12 15:31:41
|
|
||||||
* @LastEditTime: 2024-07-22 09:33:20
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
@@ -26,7 +19,7 @@ export function getItemPageData(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/base/equipment-check-program/page',
|
url: '/base/equipment-check-program/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data
|
params: 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) {
|
export function getItemData(id) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/equipment-maintain-program/get?id=' + id,
|
url: 'base/equipment-maintain-program/get?id=' + id,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @Date: 2023-11-08 15:56:52
|
* @Date: 2023-11-08 15:56:52
|
||||||
* @LastEditTime: 2024-02-26 17:02:53
|
* @LastEditTime: 2024-02-26 17:02:53
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
@@ -78,3 +78,11 @@ export function deleteLogDet(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getEqMaintainPlanPageData(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-maintain-plan-det/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export function getWorkOrderList(query) {
|
|||||||
|
|
||||||
export function getCoreProduct(id) {
|
export function getCoreProduct(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/core-product/get?id=' + id,
|
url: '/base/core-product-material/get?id=' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,11 +44,7 @@ export function updateRole(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 角色状态修改
|
// 角色状态修改
|
||||||
export function changeRoleStatus(id, status) {
|
export function changeRoleStatus(data) {
|
||||||
const data = {
|
|
||||||
id,
|
|
||||||
status
|
|
||||||
}
|
|
||||||
return request({
|
return request({
|
||||||
url: '/system/role/update-status',
|
url: '/system/role/update-status',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
<!--
|
|
||||||
filename: index.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2024-04-02 09:49:36
|
|
||||||
description:
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- 按钮切换 -->
|
<!-- 按钮切换 -->
|
||||||
<div v-if="buttonMode" class="button-nav">
|
<div v-if="buttonMode" class="button-nav">
|
||||||
@@ -12,9 +5,8 @@
|
|||||||
v-for="m in menus"
|
v-for="m in menus"
|
||||||
:key="m"
|
:key="m"
|
||||||
@click="currentMenu = m"
|
@click="currentMenu = m"
|
||||||
:data-text="m"
|
|
||||||
:class="[m === currentMenu ? 'active' : '']"
|
:class="[m === currentMenu ? 'active' : '']"
|
||||||
></button>
|
>{{m}}</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 标签切换 -->
|
<!-- 标签切换 -->
|
||||||
<div v-else class="custom-tabs" style="height: 100%; width: 100%">
|
<div v-else class="custom-tabs" style="height: 100%; width: 100%">
|
||||||
@@ -75,33 +67,24 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
height: 48px;
|
||||||
|
line-height: 48px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
border: none;
|
border: none;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 15px;
|
font-size: 16px;
|
||||||
color: #888;
|
font-weight: 500;
|
||||||
|
color: rgba(22, 22, 22, 0.65);
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
box-sizing: padding-box;
|
box-sizing: padding-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: attr(data-text);
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
left: 50%;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
transform: translate(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
color: #111;
|
color: rgba(22, 22, 22, 1);
|
||||||
//border-bottom: 2px solid #0b58ff;
|
border-bottom: 4px solid #0b58ff;
|
||||||
box-shadow: 0px 2px 1px 1px #0b58ff;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default {
|
|||||||
// tableBtn: [], // 占位
|
// tableBtn: [], // 占位
|
||||||
// searchBarFormConfig: [], // 占位
|
// searchBarFormConfig: [], // 占位
|
||||||
// // 弹窗表单配置
|
// // 弹窗表单配置
|
||||||
// dialogFormConfig: [], //
|
// dialogFormConfig: [], //
|
||||||
updateUrl: '',
|
updateUrl: '',
|
||||||
addUrl: '',
|
addUrl: '',
|
||||||
pageUrl: '',
|
pageUrl: '',
|
||||||
@@ -109,7 +109,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 处理搜索栏按钮
|
// 处理搜索栏按钮
|
||||||
handleSearchBarBtnClick(btn) {
|
handleSearchBarBtnClick(btn) {
|
||||||
|
console.log(btn);
|
||||||
|
|
||||||
// const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代
|
// const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代
|
||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const permission = {
|
|||||||
state.topbarRouters = routes
|
state.topbarRouters = routes
|
||||||
},
|
},
|
||||||
SET_SIDEBAR_ROUTERS: (state, routes) => {
|
SET_SIDEBAR_ROUTERS: (state, routes) => {
|
||||||
console.log('==SET_SIDEBAR_ROUTERS==:',routes)
|
// console.log('==SET_SIDEBAR_ROUTERS==:',routes)
|
||||||
state.sidebarRouters = routes
|
state.sidebarRouters = routes
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ export const DICT_TYPE = {
|
|||||||
|
|
||||||
// ============== ENERGY - 能源模块 =============
|
// ============== ENERGY - 能源模块 =============
|
||||||
ENERGY_UNIT: 'energy_unit',
|
ENERGY_UNIT: 'energy_unit',
|
||||||
|
ENERGY_TYPE: 'energy_type',
|
||||||
EQU_ALARM_LEVEL: 'equ_alarm_level',
|
EQU_ALARM_LEVEL: 'equ_alarm_level',
|
||||||
MONITOR_INDEX_TYPE: 'monitor_index_type',
|
MONITOR_INDEX_TYPE: 'monitor_index_type',
|
||||||
OBJECT_TYPE: 'object_type',
|
OBJECT_TYPE: 'object_type',
|
||||||
|
|||||||
@@ -38,15 +38,8 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="发货负责人" prop="deliveryPersonId">
|
<el-form-item label="发货负责人" prop="deliveryPerson">
|
||||||
<el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
|
<el-input v-model="form.deliveryPerson"></el-input>
|
||||||
<el-option
|
|
||||||
v-for="item in personList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
@@ -75,7 +68,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getWorkerList } from '@/api/base/worker'
|
|
||||||
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
|
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
|
||||||
export default {
|
export default {
|
||||||
name: 'AddOrUpdate',
|
name: 'AddOrUpdate',
|
||||||
@@ -87,7 +79,7 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
deliveryTime: null,
|
deliveryTime: null,
|
||||||
deliveryPersonId: '',
|
deliveryPerson: '',
|
||||||
principal: '',
|
principal: '',
|
||||||
principalCall: '',
|
principalCall: '',
|
||||||
principalCost: 0.00,
|
principalCost: 0.00,
|
||||||
@@ -100,7 +92,6 @@ export default {
|
|||||||
code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
|
code: [{ required: true, message: "发货单号不能为空", trigger: "blur" }]
|
||||||
},
|
},
|
||||||
orderList: [],
|
orderList: [],
|
||||||
personList: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -118,9 +109,6 @@ export default {
|
|||||||
listOrderList().then(res => {
|
listOrderList().then(res => {
|
||||||
this.orderList = res.data || []
|
this.orderList = res.data || []
|
||||||
})
|
})
|
||||||
getWorkerList().then(res => {
|
|
||||||
this.personList = res.data || []
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['addOrUpdate'].validate((valid) => {
|
this.$refs['addOrUpdate'].validate((valid) => {
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'energyTypeId'
|
param: 'energyTypeId',
|
||||||
|
clearable: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -162,7 +163,6 @@ export default {
|
|||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(260)
|
this.tableH = this.tableHeight(260)
|
||||||
})
|
})
|
||||||
this.getList();
|
|
||||||
this.getTypeList()
|
this.getTypeList()
|
||||||
// 获取对象树形结构
|
// 获取对象树形结构
|
||||||
this.getObjTree()
|
this.getObjTree()
|
||||||
@@ -171,7 +171,10 @@ export default {
|
|||||||
getTypeList() {
|
getTypeList() {
|
||||||
getEnergyTypeListAll().then((res) => {
|
getEnergyTypeListAll().then((res) => {
|
||||||
this.formConfig[0].selectOptions = res.data || []
|
this.formConfig[0].selectOptions = res.data || []
|
||||||
|
this.formConfig[0].defaultSelect = res.data[0].id
|
||||||
|
this.queryParams.energyTypeId = res.data[0].id
|
||||||
this.energyTypeList = res.data || []
|
this.energyTypeList = res.data || []
|
||||||
|
this.getList();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ export default {
|
|||||||
init(param) {
|
init(param) {
|
||||||
this.form.connectId = param.connectId
|
this.form.connectId = param.connectId
|
||||||
getEnergyTypeListAll().then((res) => {
|
getEnergyTypeListAll().then((res) => {
|
||||||
|
console.log(res)
|
||||||
this.energyListType = res.data || []
|
this.energyListType = res.data || []
|
||||||
})
|
})
|
||||||
if (param.id) {
|
if (param.id) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width='30%'
|
width='50%'
|
||||||
>
|
>
|
||||||
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
|
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
@@ -60,7 +60,8 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'objCode',
|
prop: 'objCode',
|
||||||
label: '对象编码'
|
label: '对象编码',
|
||||||
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'plcTableName',
|
prop: 'plcTableName',
|
||||||
@@ -69,7 +70,8 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'plcTableCode',
|
prop: 'plcTableCode',
|
||||||
label: '关联表编码',
|
label: '关联表编码',
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true,
|
||||||
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'cnName',
|
prop: 'cnName',
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
type: '',
|
type: '',
|
||||||
energyTypeId: ''
|
energyTypeId: '',
|
||||||
|
remark: ''
|
||||||
},
|
},
|
||||||
plcList: [],
|
plcList: [],
|
||||||
objList: [],
|
objList: [],
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
class="tableInnerButton"
|
class="tableInnerButton"
|
||||||
@click="showInnerTable(injectData)"
|
@click="showInnerTable(injectData)"
|
||||||
>详情</el-button
|
>价格详情</el-button
|
||||||
>
|
>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -3,7 +3,14 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="能源类型" prop="name">
|
<el-form-item label="能源类型" prop="name">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-select v-model="form.name" placeholder="请选择" style="width: 100%;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in getDictDatas(DICT_TYPE.ENERGY_TYPE)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -213,10 +220,6 @@ export default {
|
|||||||
// 增加
|
// 增加
|
||||||
emitButtonClick1() {
|
emitButtonClick1() {
|
||||||
let n = this.tableData1.length
|
let n = this.tableData1.length
|
||||||
if (n >=3) {
|
|
||||||
this.$modal.msgWarning('最多可添加3档计价')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
||||||
obj.endTime = ''
|
obj.endTime = ''
|
||||||
@@ -225,10 +228,6 @@ export default {
|
|||||||
},
|
},
|
||||||
emitButtonClick2() {
|
emitButtonClick2() {
|
||||||
let n = this.tableData2.length
|
let n = this.tableData2.length
|
||||||
if (n >=3) {
|
|
||||||
this.$modal.msgWarning('最多可添加3档计价')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
||||||
obj.endUsed = 0
|
obj.endUsed = 0
|
||||||
|
|||||||
@@ -80,10 +80,14 @@ export default {
|
|||||||
return {
|
return {
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'select',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
|
selectOptions: this.getDictDatas(this.DICT_TYPE.ENERGY_TYPE),
|
||||||
placeholder: '能源类型',
|
placeholder: '能源类型',
|
||||||
param: 'name'
|
labelField: 'label',
|
||||||
|
valueField: 'label',
|
||||||
|
param: 'name',
|
||||||
|
flilterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|||||||
@@ -13,60 +13,6 @@
|
|||||||
v-loading="formLoading">
|
v-loading="formLoading">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
|
||||||
label="产线"
|
|
||||||
prop="productionLineId"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.productionLineId"
|
|
||||||
placeholder="请选择产线"
|
|
||||||
filterable
|
|
||||||
@change="handleProductlineChange">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in productionLineList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="工段"
|
|
||||||
prop="sectionId"
|
|
||||||
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.sectionId"
|
|
||||||
placeholder="请选择工段"
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', dataForm)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in workshopSectionList"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="按钮盒识别码"
|
|
||||||
prop="buttonId"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
message: '请输入整数',
|
|
||||||
trigger: 'blur',
|
|
||||||
transform: (val) => Number.isInteger(Number(val)) && Number(val),
|
|
||||||
},
|
|
||||||
]">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.buttonId"
|
|
||||||
@change="$emit('update', dataForm)"
|
|
||||||
placeholder="请输入整数" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="产线"
|
label="产线"
|
||||||
prop="productionLineId"
|
prop="productionLineId"
|
||||||
@@ -130,13 +76,22 @@
|
|||||||
placeholder="请输入整数" />
|
placeholder="请输入整数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="按钮盒模式"
|
||||||
|
prop="model">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.model"
|
||||||
|
@change="$emit('update', dataForm)"
|
||||||
|
placeholder="请输入按钮盒模式" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="按钮值"
|
label="按钮值"
|
||||||
prop="keyValue"
|
prop="keyValue"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
{ required: true, message: '按钮值不能为空', trigger: 'blur' },
|
||||||
{
|
{
|
||||||
type: 'number',
|
type: 'number',
|
||||||
message: '请输入100以内的整数',
|
message: '请输入100以内的整数',
|
||||||
@@ -154,17 +109,22 @@
|
|||||||
min="0"
|
min="0"
|
||||||
max="100"
|
max="100"
|
||||||
@change="$emit('update', dataForm)"
|
@change="$emit('update', dataForm)"
|
||||||
placeholder="请输入按钮盒模式" />
|
placeholder="请输入按钮值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="检测内容" prop="inspectionDetId">
|
<el-form-item
|
||||||
|
label="检测内容"
|
||||||
|
prop="inspectionDetId"
|
||||||
|
:rules="[
|
||||||
|
{ required: true, message: '检测内容不能为空', trigger: 'blur' },
|
||||||
|
]">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.inspectionDetId"
|
v-model="dataForm.inspectionDetId"
|
||||||
placeholder="请选择检测内容"
|
placeholder="请选择检测内容"
|
||||||
filterable
|
filterable
|
||||||
@change="$emit('update', dataForm)">
|
@change="handleInspectionDetChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="opt in inspectionDetList"
|
v-for="opt in inspectionDetList"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
@@ -203,14 +163,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getProductionLineList();
|
this.getProductionLineList();
|
||||||
this.getQualityInspectionDetList();
|
this.getQualityInspectionDetList();
|
||||||
// this.getWorksectionList();
|
if (this.dataForm.productionLineId) {
|
||||||
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
|
this.getWorksectionList(this.dataForm.productionLineId);
|
||||||
// this.formLoading = false;
|
}
|
||||||
// this.$emit('update', {
|
|
||||||
// ...this.dataForm,
|
|
||||||
// code,
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'dataForm.productionId': {
|
'dataForm.productionId': {
|
||||||
@@ -279,11 +234,18 @@ export default {
|
|||||||
this.dataForm.sectionId = null;
|
this.dataForm.sectionId = null;
|
||||||
this.$emit('update', this.dataForm);
|
this.$emit('update', this.dataForm);
|
||||||
},
|
},
|
||||||
|
|
||||||
async getCode(url) {
|
async getCode(url) {
|
||||||
const response = await this.$axios(url);
|
const response = await this.$axios(url);
|
||||||
return response.data;
|
return response.data;
|
||||||
},
|
},
|
||||||
|
handleInspectionDetChange(id) {
|
||||||
|
this.inspectionDetList.forEach((item) => {
|
||||||
|
if (item.value == id) {
|
||||||
|
this.dataForm.inspectionDetContent = item.label;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$emit('update', this.dataForm);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form"/>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -65,78 +65,6 @@ export default {
|
|||||||
components: { DialogForm },
|
components: { DialogForm },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
rows: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '产线',
|
|
||||||
url: '/base/production-line/listAll',
|
|
||||||
prop: 'productionId',
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '产线不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
bind: {
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '工段',
|
|
||||||
url: '/base/workshop-section/listAll',
|
|
||||||
prop: 'sectionId',
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
bind: {
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '按钮盒识别码',
|
|
||||||
prop: 'buttonId',
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
message: '请输入整数',
|
|
||||||
trigger: 'blur',
|
|
||||||
transform: (val) =>
|
|
||||||
Number.isInteger(Number(val)) && Number(val),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{ input: true, label: '按钮盒模式', prop: 'model' },
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '按钮值',
|
|
||||||
prop: 'keyValue',
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
message: '请输入100以内的整数',
|
|
||||||
trigger: 'blur',
|
|
||||||
transform: (val) =>
|
|
||||||
Number(val) <= 100 && Number.isInteger(+val) && Number(val),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
bind: { type: 'number', min: 0, max: 100 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
select: true,
|
|
||||||
label: '检测内容',
|
|
||||||
url: '/base/quality-inspection-det/listAll',
|
|
||||||
prop: 'inspectionDetId',
|
|
||||||
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
||||||
bind: {
|
|
||||||
filterable: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
@@ -230,6 +158,7 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
buttonId: null,
|
buttonId: null,
|
||||||
inspectionDetId: null,
|
inspectionDetId: null,
|
||||||
|
inspectionDetContent: null,
|
||||||
productionLineId: null,
|
productionLineId: null,
|
||||||
sectionId: null,
|
sectionId: null,
|
||||||
model: null,
|
model: null,
|
||||||
@@ -256,12 +185,13 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
buttonId: null,
|
buttonId: null,
|
||||||
|
inspectionDetId: null,
|
||||||
inspectionDetContent: null,
|
inspectionDetContent: null,
|
||||||
productionId: null,
|
productionLineId: null,
|
||||||
sectionId: null,
|
sectionId: null,
|
||||||
model: null,
|
model: null,
|
||||||
keyValue: null,
|
keyValue: null,
|
||||||
};
|
},
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
|
|||||||
@@ -219,6 +219,7 @@ export default {
|
|||||||
getTypeList() {
|
getTypeList() {
|
||||||
getEnergyTypeListAll().then((res) => {
|
getEnergyTypeListAll().then((res) => {
|
||||||
this.energyTypeList = res.data || []
|
this.energyTypeList = res.data || []
|
||||||
|
this.queryParams.energyTypeId = res.data[0].id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 范围选择器
|
// 范围选择器
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div style="background: #f2f4f9; height: 40px; width: 100%">
|
<div style="background: #f2f4f9; height: 56px; width: 100%">
|
||||||
<ButtonNav
|
<ButtonNav
|
||||||
:menus="['走势分析', '对比分析', '同比分析', '环比分析']"
|
:menus="['走势分析', '对比分析', '同比分析', '环比分析']"
|
||||||
@change="currentMenu">
|
@change="currentMenu">
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ export default {
|
|||||||
getTypeList() {
|
getTypeList() {
|
||||||
getEnergyTypeListAll().then((res) => {
|
getEnergyTypeListAll().then((res) => {
|
||||||
this.energyTypeList = res.data || [];
|
this.energyTypeList = res.data || [];
|
||||||
|
this.queryParams.energyTypeId = res.data[0].id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getObjTree() {
|
getObjTree() {
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
this.fillLineOptions();
|
this.fillLineOptions();
|
||||||
this.fillProductOptions();
|
// this.fillProductOptions();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// window.addEventListener('resize', () => {
|
// window.addEventListener('resize', () => {
|
||||||
@@ -284,23 +284,23 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
async fillProductOptions() {
|
// async fillProductOptions() {
|
||||||
const { data } = await this.$axios({
|
// const { data } = await this.$axios({
|
||||||
url: '/base/core-product/listAll',
|
// url: '/base/core-product/listAll',
|
||||||
method: 'get',
|
// method: 'get',
|
||||||
});
|
// });
|
||||||
const cfg = this.searchBarFormConfig.find(
|
// const cfg = this.searchBarFormConfig.find(
|
||||||
(item) => item.__index == 'product'
|
// (item) => item.__index == 'product'
|
||||||
);
|
// );
|
||||||
this.$set(
|
// this.$set(
|
||||||
cfg,
|
// cfg,
|
||||||
'selectOptions',
|
// 'selectOptions',
|
||||||
data.map((item) => ({
|
// data.map((item) => ({
|
||||||
id: item.id,
|
// id: item.id,
|
||||||
name: item.name,
|
// name: item.name,
|
||||||
}))
|
// }))
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
|
|
||||||
async getList() {
|
async getList() {
|
||||||
const { data } = await this.$axios({
|
const { data } = await this.$axios({
|
||||||
|
|||||||
@@ -119,12 +119,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
searchBarKeys: ['groupId', 'equipmentName'],
|
searchBarKeys: ['groupId', 'equipmentName'],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('equipment:bind-group:update')
|
// this.$auth.hasPermi('equipment:bind-group:update')
|
||||||
? {
|
// ? {
|
||||||
type: 'detail',
|
// type: 'detail',
|
||||||
btnName: '查看报警',
|
// btnName: '查看报警',
|
||||||
}
|
// }
|
||||||
: undefined,
|
// : undefined,
|
||||||
this.$auth.hasPermi('equipment:bind-group:update')
|
this.$auth.hasPermi('equipment:bind-group:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
@@ -371,8 +371,8 @@ export default {
|
|||||||
},
|
},
|
||||||
handleTableBtnClick({ data, type }) {
|
handleTableBtnClick({ data, type }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.handleDetail(data, 'edit');
|
this.handleUpdate(data)
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
this.handleDelete(data);
|
this.handleDelete(data);
|
||||||
@@ -397,7 +397,7 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '添加设备与分组绑定';
|
this.title = '添加设备与分组绑定';
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
@@ -432,19 +432,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 查看报警
|
// 查看报警
|
||||||
handleDetail(row, mode = 'detail') {
|
// handleDetail(row, mode = 'detail') {
|
||||||
const { equipmentId, equipmentName, groupCode, groupId, groupName, id } =
|
// const { equipmentId, equipmentName, groupCode, groupId, groupName, id } =
|
||||||
row;
|
// row;
|
||||||
// 打开抽屉
|
// // 打开抽屉
|
||||||
this.editMode = mode;
|
// this.editMode = mode;
|
||||||
this.alarmForm.id = groupId;
|
// this.alarmForm.id = groupId;
|
||||||
this.alarmForm.equipmentGroupCode = groupCode;
|
// this.alarmForm.equipmentGroupCode = groupCode;
|
||||||
this.alarmForm.equipmentGroupName = groupName;
|
// this.alarmForm.equipmentGroupName = groupName;
|
||||||
this.editVisible = true;
|
// this.editVisible = true;
|
||||||
this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
this.$refs['drawer'].init();
|
// this.$refs['drawer'].init();
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
filename: CollectionConfig.vue
|
filename: CollectionConfig.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
date: 2023-10-30 10:09:03
|
date: 2023-10-30 10:09:03
|
||||||
description:
|
description:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -198,8 +198,8 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '关联表编码',
|
label: '标识名称',
|
||||||
placeholder: '请选择关联表编码',
|
placeholder: '请选择标识名称',
|
||||||
param: 'plcId',
|
param: 'plcId',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
filterable: true,
|
filterable: true,
|
||||||
|
|||||||
@@ -1,160 +1,100 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-07-31 09:48:36
|
* @LastEditTime: 2024-11-18 09:51:03
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" :before-close="beforeClose"
|
||||||
:visible.sync="visible"
|
class="drawer" size="60%">
|
||||||
:show-close="false"
|
<small-title slot="title" :no-padding="true">
|
||||||
:wrapper-closable="true"
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
:before-close="beforeClose"
|
</small-title>
|
||||||
class="drawer"
|
<div class="content">
|
||||||
size="60%">
|
<div class="visual-part">
|
||||||
<small-title slot="title" :no-padding="true">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
label-width="100px" label-position="top">
|
||||||
</small-title>
|
<el-row :gutter="20">
|
||||||
<div class="content">
|
<el-col :span="8">
|
||||||
<div class="visual-part">
|
<el-form-item label="巡检单名称" prop="name">
|
||||||
<el-form
|
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
|
||||||
:model="dataForm"
|
</el-form-item>
|
||||||
:rules="dataRule"
|
</el-col>
|
||||||
ref="dataForm"
|
<el-col :span="8">
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
<el-form-item label="部门" prop="departmentId">
|
||||||
label-width="100px"
|
<el-select v-model="dataForm.departmentId" :disabled="isdetail" :placeholder="`请选择部门`"
|
||||||
label-position="top">
|
style="width: 100%">
|
||||||
<el-row :gutter="20">
|
<el-option v-for="opt in departmentOptions" :key="opt.id" :label="opt.name" :value="opt.id" />
|
||||||
<el-col :span="8">
|
</el-select>
|
||||||
<el-form-item label="巡检单名称" prop="name">
|
</el-form-item>
|
||||||
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="班次" prop="groupClass">
|
||||||
<el-col :span="8">
|
<el-select v-model="dataForm.groupClass" filterable clearable multiple :disabled="isdetail"
|
||||||
<el-form-item label="部门" prop="departmentId">
|
style="width: 100%" placeholder="请选择班次">
|
||||||
<el-select
|
<el-option v-for="d in groupOptions" :key="d.id" :label="d.label" :value="d.label" />
|
||||||
v-model="dataForm.departmentId"
|
</el-select>
|
||||||
:disabled="isdetail"
|
</el-form-item>
|
||||||
:placeholder="`请选择部门`"
|
</el-col>
|
||||||
style="width: 100%">
|
</el-row>
|
||||||
<el-option
|
<el-row :gutter="20">
|
||||||
v-for="opt in departmentOptions"
|
<el-col :span="8">
|
||||||
:key="opt.id"
|
<el-form-item label="巡检人" prop="checkPerson">
|
||||||
:label="opt.name"
|
<!-- <el-input v-model="dataForm.checkPerson" :disabled="isdetail" placeholder="请输入巡检人" /> -->
|
||||||
:value="opt.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="班次" prop="groupClass">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.groupClass"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
multiple
|
|
||||||
:disabled="isdetail"
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择班次">
|
|
||||||
<el-option
|
|
||||||
v-for="d in groupOptions"
|
|
||||||
:key="d.id"
|
|
||||||
:label="d.label"
|
|
||||||
:value="d.label" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="巡检人" prop="checkPerson">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.checkPerson"
|
|
||||||
:placeholder="`请选择巡检人`"
|
|
||||||
multiple
|
|
||||||
clearable
|
|
||||||
:disabled="isdetail"
|
|
||||||
filterable
|
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in inspectorOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.label" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="dataForm.actualCheckTime"
|
|
||||||
type="datetime"
|
|
||||||
:disabled="isdetail"
|
|
||||||
placeholder="请选择实际巡检时间"
|
|
||||||
value-format="timestamp"
|
|
||||||
style="width: 100%" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="idAttrShow">
|
<el-select v-model="dataForm.checkPerson" :placeholder="`请选择巡检人`" multiple clearable
|
||||||
<small-title>
|
:disabled="isdetail" filterable style="width: 100%">
|
||||||
巡检内容
|
<el-option v-for="opt in inspectorOptions" :key="opt.value" :label="opt.label" :value="opt.label" />
|
||||||
</small-title>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
||||||
|
<el-date-picker v-model="dataForm.actualCheckTime" type="datetime" :disabled="isdetail"
|
||||||
|
placeholder="请选择实际巡检时间" value-format="timestamp" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="!isdetail" style="display: flex">
|
<div v-if="idAttrShow">
|
||||||
<SearchBar
|
<small-title>
|
||||||
:formConfigs="searchBarFormConfig"
|
巡检内容
|
||||||
ref="attr-search-bar"
|
</small-title>
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
<!-- <div class="action_btn"> -->
|
|
||||||
<el-button type="text" class="action_btn" @click="addNew()">
|
|
||||||
<span style="display: inline-block;">
|
|
||||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
|
||||||
<span class="add">添加内容</span>
|
|
||||||
</span>
|
|
||||||
</el-button>
|
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
<base-table
|
|
||||||
:table-props="tableProps"
|
|
||||||
:page="listQuery.pageNo"
|
|
||||||
:limit="listQuery.pageSize"
|
|
||||||
:table-data="detList">
|
|
||||||
<method-btn
|
|
||||||
v-if="!isdetail"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-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>
|
<div v-if="!isdetail" style="display: flex">
|
||||||
|
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
<!-- <div class="action_btn"> -->
|
||||||
|
<el-button type="text" class="action_btn" @click="addNew()">
|
||||||
|
<span style="display: inline-block;">
|
||||||
|
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||||
|
<span class="add">添加内容</span>
|
||||||
|
</span>
|
||||||
|
</el-button>
|
||||||
|
<!-- </div> -->
|
||||||
|
</div>
|
||||||
|
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||||
|
:table-data="detList">
|
||||||
|
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-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 v-if="!isdetail" class="drawer-body__footer">
|
</div>
|
||||||
<el-button @click="goback()">取消</el-button>
|
|
||||||
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
|
|
||||||
<el-button v-if="isshowConfirm" type="primary" @click="confirmIns()">保存</el-button>
|
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<attr-add
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
v-if="addOrUpdateVisible"
|
<el-button @click="goback()">取消</el-button>
|
||||||
ref="addOrUpdate"
|
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
|
||||||
:order-id="dataForm.id"
|
<el-button v-if="isshowConfirm" type="primary" @click="confirmIns()">保存</el-button>
|
||||||
@refreshDataList="getList" />
|
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||||
</el-drawer>
|
</div>
|
||||||
|
|
||||||
|
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
|
||||||
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -305,15 +245,15 @@ export default {
|
|||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
// const workerlist = await this.$axios('/base/core-worker/listAll');
|
||||||
if (workerlist.code == 0) {
|
// if (workerlist.code == 0) {
|
||||||
inspectorList = inspectorList.concat(
|
// inspectorList = inspectorList.concat(
|
||||||
workerlist.data.map((item) => ({
|
// workerlist.data.map((item) => ({
|
||||||
label: item.name,
|
// label: item.name,
|
||||||
value: item.id,
|
// value: item.id,
|
||||||
}))
|
// }))
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
this.inspectorOptions = inspectorList;
|
this.inspectorOptions = inspectorList;
|
||||||
// const res1 = await groupClassesListAll();
|
// const res1 = await groupClassesListAll();
|
||||||
// this.groupOptions = res1.data || [];
|
// this.groupOptions = res1.data || [];
|
||||||
@@ -453,9 +393,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url:
|
url:
|
||||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
`/base/equipment-check-order/confirm`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [this.dataForm.id],
|
data: {
|
||||||
|
ids: [this.dataForm.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
}).then(res =>{
|
}).then(res =>{
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|||||||
@@ -42,9 +42,7 @@
|
|||||||
import AddOrUpdate from './add-or-updata';
|
import AddOrUpdate from './add-or-updata';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import {
|
import { exportCheckOrderExcel } from '@/api/equipment/base/maintain/record';
|
||||||
exportCheckOrderExcel,
|
|
||||||
} from '@/api/equipment/base/maintain/record';
|
|
||||||
import WaitingListTable from './WaitingListTable.vue';
|
import WaitingListTable from './WaitingListTable.vue';
|
||||||
|
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
@@ -76,16 +74,14 @@ export default {
|
|||||||
name: 'Confirm',
|
name: 'Confirm',
|
||||||
components: {
|
components: {
|
||||||
WaitingListTable,
|
WaitingListTable,
|
||||||
AddOrUpdate
|
AddOrUpdate,
|
||||||
},
|
},
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
recordDetailVisible: false,
|
recordDetailVisible: false,
|
||||||
searchBarKeys: [
|
searchBarKeys: ['name'],
|
||||||
'name'
|
|
||||||
],
|
|
||||||
tobeConfirmedIdList: [],
|
tobeConfirmedIdList: [],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@@ -100,46 +96,51 @@ export default {
|
|||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: (this.$auth.hasPermiAnd([
|
|
||||||
'equipment:check-record:create',
|
|
||||||
'base:core-worker:query',
|
|
||||||
'base:core-production-line:query',
|
|
||||||
'base:core-department:query'
|
|
||||||
]) || this.$auth.hasPermi('equipment:check-record:update') || this.$auth.hasPermi('equipment:check-record:export')) ? 'separate' : '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermiAnd([
|
|
||||||
'equipment:check-record:create',
|
|
||||||
'base:core-worker:query',
|
|
||||||
'base:core-production-line:query',
|
|
||||||
'base:core-department:query'
|
|
||||||
])
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
plain: true,
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('equipment:check-record:update')
|
type:
|
||||||
|
this.$auth.hasPermiAnd([
|
||||||
|
'equipment:check-record:create',
|
||||||
|
'base:core-worker:query',
|
||||||
|
'base:core-production-line:query',
|
||||||
|
'base:core-department:query',
|
||||||
|
]) ||
|
||||||
|
this.$auth.hasPermi('equipment:check-record:update') ||
|
||||||
|
this.$auth.hasPermi('equipment:check-record:export')
|
||||||
|
? 'separate'
|
||||||
|
: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermiAnd([
|
||||||
|
'equipment:check-record:create',
|
||||||
|
'base:core-worker:query',
|
||||||
|
'base:core-production-line:query',
|
||||||
|
'base:core-department:query',
|
||||||
|
])
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '新增',
|
||||||
|
name: 'add',
|
||||||
|
plain: true,
|
||||||
|
color: 'success',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('equipment:check-record:update')
|
||||||
? 'button'
|
? 'button'
|
||||||
: '',
|
: '',
|
||||||
btnName: '巡检人批量确认',
|
btnName: '巡检人批量确认',
|
||||||
name: 'batchConfirm',
|
name: 'batchConfirm',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('equipment:check-record:update')
|
type: this.$auth.hasPermi('equipment:check-record:update')
|
||||||
? 'button'
|
? 'button'
|
||||||
: '',
|
: '',
|
||||||
btnName: '确认人批量确认',
|
btnName: '确认人批量确认',
|
||||||
name: 'batchConfirm2',
|
name: 'batchConfirm2',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// type: this.$auth.hasPermi('equipment:check-record:export')
|
// type: this.$auth.hasPermi('equipment:check-record:export')
|
||||||
// ? 'button'
|
// ? 'button'
|
||||||
@@ -194,7 +195,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 批量确认 */
|
/** 批量确认 */
|
||||||
async searchBarClicked(btn) {
|
async handleSearchBarBtnClick(btn) {
|
||||||
|
console.log(11111);
|
||||||
|
|
||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'batchConfirm':
|
case 'batchConfirm':
|
||||||
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
||||||
@@ -211,11 +214,45 @@ export default {
|
|||||||
// }
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||||
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
url: `/base/equipment-check-order/confirm`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: {
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.getList();
|
||||||
|
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
||||||
|
res.code != 0 && this.$modal.msgError('确认失败');
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
case 'batchConfirm2':
|
||||||
|
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
||||||
|
this.$message.warning('请选择待确认的设备巡检单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认所有选中巡检单"?')
|
||||||
|
.then(() => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
|
// }
|
||||||
|
return this.$axios({
|
||||||
|
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||||
|
url: `/base/equipment-check-order/confirm2`,
|
||||||
|
method: 'put',
|
||||||
|
data: {
|
||||||
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -224,34 +261,15 @@ export default {
|
|||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
res.code != 0 && this.$modal.msgError('确认失败');
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
case 'batchConfirm2':
|
break;
|
||||||
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
case 'search':
|
||||||
this.$message.warning('请选择待确认的设备巡检单');
|
this.getList()
|
||||||
return;
|
break;
|
||||||
}
|
case 'add':
|
||||||
this.$modal
|
this.addOrUpdateVisible = true;
|
||||||
.confirm('是否确认所有选中巡检单"?')
|
this.$nextTick(() => {
|
||||||
.then(() => {
|
this.$refs.addOrUpdate.init();
|
||||||
// let checkPersonParam = '';
|
});
|
||||||
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
|
||||||
// /** 如有必要,更新巡检人 */
|
|
||||||
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
|
||||||
// }
|
|
||||||
return this.$axios({
|
|
||||||
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
|
||||||
url: `/base/equipment-check-order/confirm2?confirmPerson=${this.$store.getters.nickname}`,
|
|
||||||
method: 'put',
|
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
|
||||||
(item) => item.id
|
|
||||||
),
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.getList();
|
|
||||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
|
||||||
res.code != 0 && this.$modal.msgError('确认失败');
|
|
||||||
})
|
|
||||||
.catch(() => { });
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -311,7 +329,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleSearchBarChange({ param, value }) {
|
handleSearchBarChange({ param, value }) {
|
||||||
console.log('122', param)
|
console.log('122', param);
|
||||||
// if ('specialType' === param) {
|
// if ('specialType' === param) {
|
||||||
// if (!value) {
|
// if (!value) {
|
||||||
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
|
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
|
||||||
@@ -327,7 +345,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
this.recv({
|
this.recv({
|
||||||
...this.queryParams
|
...this.queryParams,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
@@ -376,18 +394,18 @@ export default {
|
|||||||
// this.title = '添加待确认保养记录';
|
// this.title = '添加待确认保养记录';
|
||||||
// this.addOrEditTitle = '新增';
|
// this.addOrEditTitle = '新增';
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init();
|
this.$refs.addOrUpdate.init();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增 / 修改
|
// 新增 / 修改
|
||||||
// addOrUpdateHandle(id) {
|
// addOrUpdateHandle(id) {
|
||||||
// this.addOrUpdateVisible = true;
|
// this.addOrUpdateVisible = true;
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// this.$refs.addOrUpdate.init(id);
|
// this.$refs.addOrUpdate.init(id);
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
|
||||||
getConfirmed() {
|
getConfirmed() {
|
||||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
return this.$confirm('是否直接确认巡检记录', '提示', {
|
||||||
@@ -462,10 +480,12 @@ export default {
|
|||||||
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
||||||
// }
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url:
|
url: `/base/equipment-check-order/confirm`,
|
||||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
data: {
|
||||||
|
ids: [row.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -478,9 +498,9 @@ export default {
|
|||||||
/** 编辑 */
|
/** 编辑 */
|
||||||
async handleEdit(row) {
|
async handleEdit(row) {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(row.id);
|
this.$refs.addOrUpdate.init(row.id);
|
||||||
});
|
});
|
||||||
// this.reset();
|
// this.reset();
|
||||||
// if (row.relatePlan == 1) {
|
// if (row.relatePlan == 1) {
|
||||||
// // 计划型
|
// // 计划型
|
||||||
@@ -501,9 +521,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm(
|
.confirm('是否确认删除巡检单名称为"' + row.name + '"的数据项?')
|
||||||
'是否确认删除巡检单名称为"' + row.name + '"的数据项?'
|
|
||||||
)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-check-order/delete?id=' + row.id,
|
url: '/base/equipment-check-order/delete?id=' + row.id,
|
||||||
@@ -518,9 +536,9 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(row.id, true);
|
this.$refs.addOrUpdate.init(row.id, true);
|
||||||
});
|
});
|
||||||
// this.recordDetailVisible = true;
|
// this.recordDetailVisible = true;
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// this.$refs.recordDetailDrawer.show({
|
// this.$refs.recordDetailDrawer.show({
|
||||||
|
|||||||
@@ -6,84 +6,60 @@
|
|||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer" size="50%">
|
||||||
:visible.sync="visible"
|
<small-title slot="title" :no-padding="true">
|
||||||
:show-close="false"
|
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
|
||||||
:wrapper-closable="true"
|
{{ '添加内容' }}
|
||||||
class="drawer"
|
</small-title>
|
||||||
size="50%">
|
<div class="content">
|
||||||
<small-title slot="title" :no-padding="true">
|
<div class="visual-part">
|
||||||
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
|
|
||||||
{{ '添加内容' }}
|
|
||||||
</small-title>
|
|
||||||
<div class="content">
|
|
||||||
<div class="visual-part">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="blodTip">巡检单名称</div>
|
<div class="blodTip">巡检单名称</div>
|
||||||
<div class="lightTip">{{ dataForm.name }}</div>
|
<div class="lightTip">{{ dataForm.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="blodTip">部门</div>
|
<div class="blodTip">部门</div>
|
||||||
<div class="lightTip">{{ dataForm.department }}</div>
|
<div class="lightTip">{{ dataForm.department }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="blodTip">巡检时间</div>
|
<div class="blodTip">计划巡检时间</div>
|
||||||
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
|
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="attr-list">
|
||||||
<small-title
|
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
巡检内容
|
||||||
:no-padding="true">
|
</small-title>
|
||||||
巡检内容
|
|
||||||
</small-title>
|
|
||||||
|
|
||||||
<div v-if="!isdetail" class="action_btn">
|
<div v-if="!isdetail" class="action_btn">
|
||||||
<template>
|
<template>
|
||||||
<span style="display: inline-block;">
|
<span style="display: inline-block;">
|
||||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||||
:table-props="tableProps"
|
:table-data="checkDetList">
|
||||||
:page="listQuery.pageNo"
|
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
:limit="listQuery.pageSize"
|
@clickBtn="handleClick" />
|
||||||
:table-data="checkDetList">
|
</base-table>
|
||||||
<method-btn
|
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
|
||||||
v-if="!isdetail"
|
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
|
||||||
</base-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 class="drawer-body__footer">
|
<!-- <div class="drawer-body__footer">
|
||||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
|
||||||
v-if="addOrUpdateVisible"
|
</el-drawer>
|
||||||
ref="addOrUpdate"
|
|
||||||
:order-id="dataForm.id"
|
|
||||||
@refreshDataList="getList" />
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -111,8 +87,13 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'program',
|
prop: 'program',
|
||||||
label: '检查项目',
|
label: '巡检项目',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
prop: 'checkResult',
|
||||||
|
label: '巡检结果',
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
this.groupOptions =
|
this.groupOptions =
|
||||||
res1.data.map((item) => {
|
res1.data.map((item) => {
|
||||||
item.label =
|
item.label =
|
||||||
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict);
|
item.name + (getDictDataLabel('workshop', item.roomNameDict) ? ' - ' + getDictDataLabel('workshop', item.roomNameDict) : '')
|
||||||
return item;
|
return item;
|
||||||
}) || [];
|
}) || [];
|
||||||
// const res = await getEquipmentAll()
|
// const res = await getEquipmentAll()
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="默认巡检结果" prop="resultType">
|
<el-form-item label="默认巡检结果" prop="resultType">
|
||||||
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
|
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
|
||||||
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -38,13 +38,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="11">
|
||||||
<el-form-item prop="minValue">
|
<el-form-item prop="minValue">
|
||||||
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="4">
|
||||||
<el-form-item prop="maxValue">
|
—————
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item prop="maxValue" label-width="20">
|
||||||
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
||||||
placeholder="请输入最大值" />
|
placeholder="请输入最大值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -113,7 +116,12 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClear() {
|
||||||
|
this.dataForm.minValue = undefined
|
||||||
|
this.dataForm.maxValue = undefined
|
||||||
|
this.dataForm.maintainResult = undefined
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList();
|
const res = await getList();
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
mounted() {
|
// mounted() {
|
||||||
this.getDataList()
|
// this.getDataList()
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import moment from 'moment';
|
|||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import { deleteProgramTypeData } from '@/api/equipment/base/maintain/items'
|
import { deleteProgramTypeData } from '@/api/equipment/base/maintain/items'
|
||||||
import showDetail from './showDetail.vue'
|
import showDetail from './showDetail.vue'
|
||||||
import { publicFormatter } from '@/utils/dict';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PlanConfig',
|
name: 'PlanConfig',
|
||||||
@@ -40,7 +39,7 @@ export default {
|
|||||||
const t = new Date();
|
const t = new Date();
|
||||||
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
|
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
|
||||||
return {
|
return {
|
||||||
searchBarKeys: ['equipmentName', 'createTime'],
|
searchBarKeys: ['equipmentTypeId'],
|
||||||
equipmentTypeList:[],
|
equipmentTypeList:[],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
{
|
{
|
||||||
@@ -125,7 +124,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.initSearchBar()
|
this.initSearchBar()
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@@ -231,13 +230,14 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.post(this.form).then((response) => {
|
this.post(this.form).then((res) => {
|
||||||
|
console.log('res', res)
|
||||||
this.$modal.msgSuccess('新增成功');
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList()
|
this.getList()
|
||||||
this.showDetailVisible = true
|
this.showDetailVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.showDetail.init(this.form.equipmentTypeId)
|
this.$refs.showDetail.init(res.data)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const tableProps = [
|
|||||||
align:'center',
|
align:'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'maintainResult',
|
prop: 'checkResult',
|
||||||
label: '默认巡检结果',
|
label: '默认巡检结果',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
@@ -100,9 +100,11 @@ export default {
|
|||||||
// console.log(this.tableData)
|
// console.log(this.tableData)
|
||||||
},
|
},
|
||||||
getDataList(id) {
|
getDataList(id) {
|
||||||
|
console.log(id)
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
this.queryParams.equipmentTypeId = id
|
this.queryParams.equipmentTypeId = id
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
console.log(this.queryParams.equipmentTypeId)
|
||||||
|
this.urlOptions.getDataListURL(this.queryParams).then(response => {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.listQuery.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
this.dataListLoading = false
|
this.dataListLoading = false
|
||||||
|
|||||||
@@ -6,55 +6,32 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-form
|
<el-form ref="form" :model="form" :size="size" :label-position="labelPosition" v-loading="formLoading">
|
||||||
ref="form"
|
<el-row :gutter="20">
|
||||||
:model="form"
|
<el-col :span="12">
|
||||||
:size="size"
|
<el-form-item label="设备保养单号" prop="maintainOrderNumber" :rules="[
|
||||||
:label-position="labelPosition"
|
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="设备保养单号"
|
|
||||||
prop="maintainOrderNumber"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
|
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-input
|
<el-input v-model="form.maintainOrderNumber" @change="$emit('update', form)" :placeholder="`请输入保养计划单号`"
|
||||||
v-model="form.maintainOrderNumber"
|
:disabled="disabled" />
|
||||||
@change="$emit('update', form)"
|
</el-form-item>
|
||||||
:placeholder="`请输入保养计划单号`"
|
</el-col>
|
||||||
:disabled="disabled" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="保养计划名称" prop="name">
|
<el-form-item label="保养计划名称" prop="name">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="部门" prop="departmentId" :rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
||||||
label="部门"
|
<el-select v-model="form.departmentId" :placeholder="`请选择部门`" :disabled="disabled" clearable filterable
|
||||||
prop="departmentId"
|
@change="$emit('update', form)">
|
||||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
<el-option v-for="opt in departmentOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
<el-select
|
</el-select>
|
||||||
v-model="form.departmentId"
|
</el-form-item>
|
||||||
:placeholder="`请选择部门`"
|
|
||||||
:disabled="disabled"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', form)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in departmentOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- <el-form-item
|
<!-- <el-form-item
|
||||||
label="设备大类"
|
label="设备大类"
|
||||||
prop="equipmentCategory"
|
prop="equipmentCategory"
|
||||||
:rules="[
|
:rules="[
|
||||||
@@ -72,89 +49,59 @@
|
|||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="产线" prop="lineId" :rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
|
||||||
label="产线"
|
<el-select v-model="form.lineId" :placeholder="`请选择产线`" :disabled="disabled" clearable filterable
|
||||||
prop="lineId"
|
@change="$emit('update', form)">
|
||||||
:rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
|
<el-option v-for="opt in lineOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
<el-select
|
</el-select>
|
||||||
v-model="form.lineId"
|
</el-form-item>
|
||||||
:placeholder="`请选择产线`"
|
</el-col>
|
||||||
:disabled="disabled"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
@change="$emit('update', form)">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in lineOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计划保养人员" prop="maintainer">
|
<el-form-item label="计划保养人员" prop="maintainer">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计划开始时间" prop="planStartTime">
|
<el-form-item label="计划开始时间" prop="planStartTime">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计划结束时间" prop="planEndTime">
|
<el-form-item label="计划结束时间" prop="planEndTime">
|
||||||
<el-input value="---" disabled />
|
<el-input value="---" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实际开始时间" prop="startTime" :rules="[
|
||||||
label="实际开始时间"
|
|
||||||
prop="startTime"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
|
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.startTime" type="datetime" :disabled="edit" placeholder="请选择实际开始时间"
|
||||||
v-model="form.startTime"
|
@change="$emit('update', form)" value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
:disabled="edit"
|
</el-col>
|
||||||
placeholder="请选择实际开始时间"
|
|
||||||
@change="$emit('update', form)"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实际结束时间" prop="endTime" :rules="[
|
||||||
label="实际结束时间"
|
|
||||||
prop="endTime"
|
|
||||||
:rules="[
|
|
||||||
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
|
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.endTime" type="datetime" :disabled="edit" placeholder="请选择实际结束时间"
|
||||||
v-model="form.endTime"
|
@change="$emit('update', form)" value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
:disabled="edit"
|
</el-col>
|
||||||
placeholder="请选择实际结束时间"
|
|
||||||
@change="$emit('update', form)"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
||||||
label="实际保养人员"
|
{ required: false, message: '请输入实际保养人员', trigger: 'blur' },
|
||||||
prop="maintainWorker"
|
|
||||||
:rules="[
|
|
||||||
{ required: false, message: '请选择实际保养人员', trigger: 'blur' },
|
|
||||||
]">
|
]">
|
||||||
<el-select
|
<el-input v-model="form.maintainWorker" @change="$emit('update', form)" :placeholder="`请输入实际保养人员`" :disabled="disabled" />
|
||||||
|
<!-- <el-select
|
||||||
v-model="form.maintainWorker"
|
v-model="form.maintainWorker"
|
||||||
:placeholder="`请选择实际保养人员`"
|
:placeholder="`请选择实际保养人员`"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@@ -167,21 +114,17 @@
|
|||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input
|
<el-input v-model="form.remark" @change="$emit('update', form)" :placeholder="`请输入备注`" :disabled="disabled" />
|
||||||
v-model="form.remark"
|
</el-form-item>
|
||||||
@change="$emit('update', form)"
|
</el-col>
|
||||||
:placeholder="`请输入备注`"
|
</el-row>
|
||||||
:disabled="disabled" />
|
</el-form>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -321,7 +264,6 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/system/dept/list-all-simple',
|
'/system/dept/list-all-simple',
|
||||||
'/base/core-worker/listAll',
|
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
@@ -329,10 +271,6 @@ export default {
|
|||||||
res = await this.$axios(urls[1]);
|
res = await this.$axios(urls[1]);
|
||||||
this.departmentList = res.data || [];
|
this.departmentList = res.data || [];
|
||||||
break;
|
break;
|
||||||
case 'maintainer':
|
|
||||||
res = await this.$axios(urls[2]);
|
|
||||||
this.maintainerList = res.data || [];
|
|
||||||
break;
|
|
||||||
case 'line':
|
case 'line':
|
||||||
res = await this.$axios(urls[0]);
|
res = await this.$axios(urls[0]);
|
||||||
this.lineList = res.data || [];
|
this.lineList = res.data || [];
|
||||||
|
|||||||
@@ -6,177 +6,116 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" class="drawer"
|
||||||
:visible.sync="visible"
|
custom-class="mes-drawer" size="60%" :before-close="beforeClose" @closed="$emit('destroy')">
|
||||||
:show-close="false"
|
<SmallTitle slot="title">编辑</SmallTitle>
|
||||||
:wrapper-closable="true"
|
|
||||||
class="drawer"
|
|
||||||
custom-class="mes-drawer"
|
|
||||||
size="60%"
|
|
||||||
:before-close="beforeClose"
|
|
||||||
@closed="$emit('destroy')">
|
|
||||||
<SmallTitle slot="title">编辑</SmallTitle>
|
|
||||||
|
|
||||||
<div class="drawer-body flex">
|
<div class="drawer-body flex">
|
||||||
<div class="drawer-body__content">
|
<div class="drawer-body__content">
|
||||||
<div class="form-part" style="margin-bottom: 32px">
|
<div class="form-part" style="margin-bottom: 32px">
|
||||||
<!-- <el-skeleton v-if="!showForm" animated /> -->
|
<!-- <el-skeleton v-if="!showForm" animated /> -->
|
||||||
<el-form
|
<el-form class="equipment-info-form" ref="form" :model="form" label-width="200px" label-position="top"
|
||||||
class="equipment-info-form"
|
v-loading="formLoading">
|
||||||
ref="form"
|
<el-row :gutter="20">
|
||||||
:model="form"
|
<el-col :span="8">
|
||||||
label-width="200px"
|
<el-form-item label="保养计划单号" prop="maintainOrderNumber">
|
||||||
label-position="top"
|
<!-- :rules="[
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="保养计划单号" prop="maintainOrderNumber">
|
|
||||||
<!-- :rules="[
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入保养计划单号',
|
message: '请输入保养计划单号',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]" -->
|
]" -->
|
||||||
<el-input
|
<el-input v-model="form.maintainOrderNumber" disabled :placeholder="`请输入保养计划单号`" />
|
||||||
v-model="form.maintainOrderNumber"
|
</el-form-item>
|
||||||
disabled
|
</el-col>
|
||||||
:placeholder="`请输入保养计划单号`" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="保养计划名称" prop="planName">
|
<el-form-item label="保养计划名称" prop="planName">
|
||||||
<el-input
|
<el-input v-model="form.planName" placeholder="请输入保养计划名称" disabled />
|
||||||
v-model="form.planName"
|
</el-form-item>
|
||||||
placeholder="请输入保养计划名称"
|
</el-col>
|
||||||
disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门" prop="departmentId">
|
<el-form-item label="部门" prop="departmentId">
|
||||||
<!-- :rules="[
|
<!-- :rules="[
|
||||||
{ required: true, message: '请选择部门', trigger: 'blur' },
|
{ required: true, message: '请选择部门', trigger: 'blur' },
|
||||||
]" -->
|
]" -->
|
||||||
<el-select
|
<el-select v-model="form.departmentId" :placeholder="`请选择部门`" clearable disabled filterable>
|
||||||
v-model="form.departmentId"
|
<el-option v-for="opt in departmentOptions" :key="opt.value" :label="opt.label"
|
||||||
:placeholder="`请选择部门`"
|
:value="opt.value" />
|
||||||
clearable
|
</el-select>
|
||||||
disabled
|
</el-form-item>
|
||||||
filterable>
|
</el-col>
|
||||||
<el-option
|
|
||||||
v-for="opt in departmentOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-form-item label="产线" prop="lineId">
|
||||||
<!-- :rules="[
|
<!-- :rules="[
|
||||||
{ required: true, message: '请选择产线', trigger: 'blur' },
|
{ required: true, message: '请选择产线', trigger: 'blur' },
|
||||||
]" -->
|
]" -->
|
||||||
<el-select
|
<el-select v-model="form.lineId" :placeholder="`请选择产线`" disabled clearable filterable>
|
||||||
v-model="form.lineId"
|
<el-option v-for="opt in lineOptions" :key="opt.value" :label="opt.label" :value="opt.value" />
|
||||||
:placeholder="`请选择产线`"
|
</el-select>
|
||||||
disabled
|
</el-form-item>
|
||||||
clearable
|
</el-col>
|
||||||
filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="opt in lineOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划保养人员" prop="maintainer">
|
<el-form-item label="计划保养人员" prop="maintainer">
|
||||||
<el-select
|
<el-select v-model="form.planMaintainWorker" placeholder="请选择计划保养人员" disabled clearable filterable />
|
||||||
v-model="form.planMaintainWorker"
|
</el-form-item>
|
||||||
placeholder="请选择计划保养人员"
|
</el-col>
|
||||||
disabled
|
|
||||||
clearable
|
|
||||||
filterable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划开始时间" prop="planStartTime">
|
<el-form-item label="计划开始时间" prop="planStartTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.planStartTime" type="datetime" disabled placeholder="请选择计划开始时间"
|
||||||
v-model="form.planStartTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
disabled
|
</el-col>
|
||||||
placeholder="请选择计划开始时间"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划结束时间" prop="planEndTime">
|
<el-form-item label="计划结束时间" prop="planEndTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.planEndTime" type="datetime" disabled placeholder="请选择计划结束时间"
|
||||||
v-model="form.planEndTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
disabled
|
</el-col>
|
||||||
placeholder="请选择计划结束时间"
|
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item
|
<el-form-item label="实际开始时间" prop="startTime" :rules="[
|
||||||
label="实际开始时间"
|
|
||||||
prop="startTime"
|
|
||||||
:rules="[
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择实际开始时间',
|
message: '请选择实际开始时间',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.startTime" type="datetime" placeholder="请选择实际开始时间"
|
||||||
v-model="form.startTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
placeholder="请选择实际开始时间"
|
</el-col>
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item
|
<el-form-item label="实际结束时间" prop="endTime" :rules="[
|
||||||
label="实际结束时间"
|
|
||||||
prop="endTime"
|
|
||||||
:rules="[
|
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择实际结束时间',
|
message: '请选择实际结束时间',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.endTime" type="datetime" placeholder="请选择实际结束时间"
|
||||||
v-model="form.endTime"
|
value-format="timestamp"></el-date-picker>
|
||||||
type="datetime"
|
</el-form-item>
|
||||||
placeholder="请选择实际结束时间"
|
</el-col>
|
||||||
value-format="timestamp"></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item
|
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
||||||
label="实际保养人员"
|
|
||||||
prop="maintainWorker"
|
|
||||||
:rules="[
|
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '请选择实际保养人员',
|
message: '请输入实际保养人员',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-select
|
<el-input v-model="form.maintainWorker" :placeholder="`请输入实际保养人员`" />
|
||||||
|
|
||||||
|
<!-- <el-select
|
||||||
v-model="form.maintainWorker"
|
v-model="form.maintainWorker"
|
||||||
:placeholder="`请选择实际保养人员`"
|
:placeholder="`请选择实际保养人员`"
|
||||||
multiple
|
multiple
|
||||||
@@ -187,89 +126,62 @@
|
|||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
|
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SmallTitle>保养内容</SmallTitle>
|
<SmallTitle>保养内容</SmallTitle>
|
||||||
|
|
||||||
<div style="margin-top: 12px; position: relative">
|
<div style="margin-top: 12px; position: relative">
|
||||||
<SearchBar
|
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
:formConfigs="searchBarFormConfig"
|
</div>
|
||||||
ref="attr-search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="margin-top: 12px; position: relative">
|
<div style="margin-top: 12px; position: relative">
|
||||||
<div style="position: absolute; top: -40px; right: 0">
|
<div style="position: absolute; top: -40px; right: 0">
|
||||||
<el-button @click="handleAddAttr" type="text">
|
<el-button @click="handleAddAttr" type="text">
|
||||||
<i class="el-icon-plus"></i>
|
<i class="el-icon-plus"></i>
|
||||||
添加属性
|
添加属性
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table v-loading="attrListLoading" :table-props="attrTableProps" :page="attrQuery?.params.pageNo || 1"
|
||||||
v-loading="attrListLoading"
|
:limit="attrQuery?.params.pageSize || 10" :table-data="attrList" @emitFun="handleEmitFun">
|
||||||
:table-props="attrTableProps"
|
<method-btn slot="handleBtn" label="操作" :method-list="tableBtn" @clickBtn="handleTableBtnClick" />
|
||||||
:page="attrQuery?.params.pageNo || 1"
|
</base-table>
|
||||||
:limit="attrQuery?.params.pageSize || 10"
|
|
||||||
:table-data="attrList"
|
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination
|
<pagination v-show="attrTotal > 0" :total="attrTotal" :page.sync="attrQuery.params.pageNo"
|
||||||
v-show="attrTotal > 0"
|
:limit.sync="attrQuery.params.pageSize" @pagination="getAttrList" />
|
||||||
:total="attrTotal"
|
</div>
|
||||||
:page.sync="attrQuery.params.pageNo"
|
</div>
|
||||||
:limit.sync="attrQuery.params.pageSize"
|
|
||||||
@pagination="getAttrList" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="handleConfirm">保存</el-button>
|
<el-button type="primary" @click="handleConfirm">保存</el-button>
|
||||||
<!-- sections的第二项必须是 属性列表 -->
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="sections[1].allowAdd"
|
v-if="sections[1].allowAdd"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAddAttr">
|
@click="handleAddAttr">
|
||||||
添加属性
|
添加属性
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 属性对话框 -->
|
<!-- 属性对话框 -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="attrTitle" :dialogVisible="attrFormVisible" width="35%" :append-to-body="true"
|
||||||
:dialogTitle="attrTitle"
|
custom-class="baseDialog" @close="closeAttrForm" @cancel="closeAttrForm" @confirm="submitAttrForm">
|
||||||
:dialogVisible="attrFormVisible"
|
<DialogForm v-if="attrFormVisible" ref="attrForm" v-model="attrForm" :rows="attrRows" />
|
||||||
width="35%"
|
</base-dialog>
|
||||||
:append-to-body="true"
|
</el-drawer>
|
||||||
custom-class="baseDialog"
|
|
||||||
@close="closeAttrForm"
|
|
||||||
@cancel="closeAttrForm"
|
|
||||||
@confirm="submitAttrForm">
|
|
||||||
<DialogForm
|
|
||||||
v-if="attrFormVisible"
|
|
||||||
ref="attrForm"
|
|
||||||
v-model="attrForm"
|
|
||||||
:rows="attrRows" />
|
|
||||||
</base-dialog>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -541,7 +453,7 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'system/dept/list-all-simple',
|
'system/dept/list-all-simple',
|
||||||
'/base/core-worker/listAll',
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
@@ -549,10 +461,10 @@ export default {
|
|||||||
res = await this.$axios(urls[1]);
|
res = await this.$axios(urls[1]);
|
||||||
this.departmentList = res.data || [];
|
this.departmentList = res.data || [];
|
||||||
break;
|
break;
|
||||||
case 'maintainer':
|
// case 'maintainer':
|
||||||
res = await this.$axios(urls[2]);
|
// res = await this.$axios(urls[2]);
|
||||||
this.maintainerList = res.data || [];
|
// this.maintainerList = res.data || [];
|
||||||
break;
|
// break;
|
||||||
case 'line':
|
case 'line':
|
||||||
res = await this.$axios(urls[0]);
|
res = await this.$axios(urls[0]);
|
||||||
this.lineList = res.data || [];
|
this.lineList = res.data || [];
|
||||||
|
|||||||
@@ -105,14 +105,16 @@
|
|||||||
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
<el-form-item label="实际保养人员" prop="maintainWorker" :rules="[
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '请选择实际保养人员',
|
message: '请输入实际保养人员',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<el-select v-model="form.maintainWorker" :placeholder="`请选择实际保养人员`" multiple clearable filterable>
|
<el-input v-model="form.maintainWorker" :placeholder="`请输入实际保养人员`" />
|
||||||
|
|
||||||
|
<!-- <el-select v-model="form.maintainWorker" :placeholder="`请选择实际保养人员`" multiple clearable filterable>
|
||||||
<el-option v-for="opt in maintainerOptions" :key="opt.value" :label="opt.label"
|
<el-option v-for="opt in maintainerOptions" :key="opt.value" :label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -390,10 +392,12 @@ export default {
|
|||||||
console.log('111', confirm)
|
console.log('111', confirm)
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-maintain-log/confirm?confirmPerson=' +
|
'/base/equipment-maintain-log/confirm',
|
||||||
this.$store.getters.userId,
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [this.form.id],
|
data: {
|
||||||
|
ids: [this.form.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
}).then(res =>{
|
}).then(res =>{
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@@ -445,7 +449,7 @@ export default {
|
|||||||
method: 'put',
|
method: 'put',
|
||||||
data: {
|
data: {
|
||||||
...this.form,
|
...this.form,
|
||||||
maintainWorker: this.form.maintainWorker.join(','),
|
maintainWorker: this.form.maintainWorker ? this.form.maintainWorker.join(',') :null,
|
||||||
special: false,
|
special: false,
|
||||||
relatePlan: 2
|
relatePlan: 2
|
||||||
}
|
}
|
||||||
@@ -463,8 +467,8 @@ export default {
|
|||||||
url: '/base/equipment-maintain-log/create',
|
url: '/base/equipment-maintain-log/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
...this.form,
|
...this.form,
|
||||||
maintainWorker: this.form.maintainWorker.join(','),
|
maintainWorker: this.form.maintainWorker ? this.form.maintainWorker.join(',') : null,
|
||||||
special: false,
|
special: false,
|
||||||
relatePlan: 2,
|
relatePlan: 2,
|
||||||
confirmed: false,
|
confirmed: false,
|
||||||
@@ -536,7 +540,7 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/system/dept/list-all-simple',
|
'/system/dept/list-all-simple',
|
||||||
'/base/core-worker/listAll',
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
@@ -544,10 +548,10 @@ export default {
|
|||||||
res = await this.$axios(urls[1]);
|
res = await this.$axios(urls[1]);
|
||||||
this.departmentList = res.data || [];
|
this.departmentList = res.data || [];
|
||||||
break;
|
break;
|
||||||
case 'maintainer':
|
// case 'maintainer':
|
||||||
res = await this.$axios(urls[2]);
|
// res = await this.$axios(urls[2]);
|
||||||
this.maintainerList = res.data || [];
|
// this.maintainerList = res.data || [];
|
||||||
break;
|
// break;
|
||||||
case 'line':
|
case 'line':
|
||||||
res = await this.$axios(urls[0]);
|
res = await this.$axios(urls[0]);
|
||||||
this.lineList = res.data || [];
|
this.lineList = res.data || [];
|
||||||
|
|||||||
@@ -287,9 +287,12 @@ export default {
|
|||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-maintain-log/confirm',
|
url: '/base/equipment-maintain-log/confirm',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data:{
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$message.success('确认成功');
|
// this.$message.success('确认成功');
|
||||||
@@ -313,9 +316,12 @@ export default {
|
|||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-maintain-log/confirm2',
|
url: '/base/equipment-maintain-log/confirm2',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: {
|
||||||
(item) => item.id
|
ids: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
),
|
(item) => item.id
|
||||||
|
),
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$message.success('确认成功');
|
// this.$message.success('确认成功');
|
||||||
@@ -547,7 +553,10 @@ export default {
|
|||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-maintain-log/confirm',
|
url: '/base/equipment-maintain-log/confirm',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
data: {
|
||||||
|
ids: [row.id],
|
||||||
|
confirmBy: this.$store.getters.nickname,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$message.success('确认成功');
|
// this.$message.success('确认成功');
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="blue-title">保养内容</div>
|
<div class="blue-title">保养内容</div>
|
||||||
<base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData">
|
<base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData">
|
||||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" /> -->
|
||||||
</base-table>
|
</base-table>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
maintainDuration: undefined,
|
maintainDuration: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
firstMaintenanceTime: undefined,
|
firstMaintenanceTime: undefined,
|
||||||
maintainer: undefined
|
maintainer: null
|
||||||
},
|
},
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
proLineList: [],
|
proLineList: [],
|
||||||
@@ -175,8 +175,8 @@ export default {
|
|||||||
const resline = await getCorePLList();
|
const resline = await getCorePLList();
|
||||||
this.proLineList = resline.data;
|
this.proLineList = resline.data;
|
||||||
// 保养人员
|
// 保养人员
|
||||||
const personres = await getWorkerList()
|
// const personres = await getWorkerList()
|
||||||
this.personList = personres.data || []
|
// this.personList = personres.data || []
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 获取产品属性列表
|
// 获取产品属性列表
|
||||||
@@ -259,7 +259,8 @@ export default {
|
|||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL({
|
this.urlOptions.updateURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
maintainer: this.dataForm.maintainer.join(',')
|
maintainer: this.dataForm.maintainer ? this.dataForm.maintainer.join(',') : null,
|
||||||
|
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@@ -270,7 +271,7 @@ export default {
|
|||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL({
|
this.urlOptions.createURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
maintainer: this.dataForm.maintainer.join(',')
|
maintainer: this.dataForm.maintainer ? this.dataForm.maintainer.join(',') : null,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
// this.idAttrShow = true
|
// this.idAttrShow = true
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createPlanDet, updatePlanDet, getPlanDet } from '@/api/equipment/base/maintain/planconfig';
|
import { createPlanDet, updatePlanDet, getPlanDet } from '@/api/equipment/base/maintain/planconfig';
|
||||||
import { getEquipmentPage } from '@/api/base/equipment'
|
import { getEquipmentPage } from '@/api/base/equipment'
|
||||||
import { getItemPageData } from '@/api/equipment/base/maintain/items';
|
import { getByEquId } from '@/api/equipment/base/maintain/items';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -94,20 +94,14 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleChange(val) {
|
async handleChange(val) {
|
||||||
console.log(val);
|
// let equipmentTypeId = undefined
|
||||||
let equipmentTypeId = undefined
|
// this.eqList.forEach((ele) => {
|
||||||
this.eqList.forEach((ele) => {
|
// if (ele.id == val) {
|
||||||
if (ele.id == val) {
|
// equipmentTypeId = ele.equipmentTypeId
|
||||||
equipmentTypeId = ele.equipmentTypeId
|
// }
|
||||||
}
|
// })
|
||||||
})
|
const { code, data } = await getByEquId(val)
|
||||||
const { code, data } = await getItemPageData({
|
this.programList = data
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 99,
|
|
||||||
equipmentTypeId: equipmentTypeId,
|
|
||||||
})
|
|
||||||
this.programList = data.list
|
|
||||||
console.log(data);
|
|
||||||
},
|
},
|
||||||
handleDecChange(val) {
|
handleDecChange(val) {
|
||||||
let maintenanceDes = undefined
|
let maintenanceDes = undefined
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="默认保养结果" prop="resultType">
|
<el-form-item label="默认保养结果" prop="resultType">
|
||||||
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
|
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
|
||||||
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -39,13 +39,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="11">
|
||||||
<el-form-item prop="minValue">
|
<el-form-item prop="minValue">
|
||||||
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="4">
|
||||||
<el-form-item prop="maxValue">
|
—————
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item prop="maxValue" label-width="20">
|
||||||
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
||||||
placeholder="请输入最大值" />
|
placeholder="请输入最大值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -67,6 +70,12 @@ import { getList,} from "@/api/base/qualityScrapType";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
|
|
||||||
|
props: {
|
||||||
|
mainId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
@@ -93,7 +102,7 @@ export default {
|
|||||||
id: undefined,
|
id: undefined,
|
||||||
program: undefined,
|
program: undefined,
|
||||||
resultType: undefined,
|
resultType: undefined,
|
||||||
equipmentTypeId: undefined,
|
mainId:this.mainId,
|
||||||
minValue: undefined,
|
minValue: undefined,
|
||||||
maxValue: undefined,
|
maxValue: undefined,
|
||||||
maintainResult:undefined,
|
maintainResult:undefined,
|
||||||
@@ -102,7 +111,9 @@ export default {
|
|||||||
dataRule: {
|
dataRule: {
|
||||||
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
// materialId: [{ required: true, message: "", trigger: "blur" }],
|
||||||
program: [{ required: true, message: "保养项目不能为空", trigger: "blur" }],
|
program: [{ required: true, message: "保养项目不能为空", trigger: "blur" }],
|
||||||
maintainResult: [{ required: true, message: "默认保养结果不能为空", trigger: "blur" }],
|
maintainResult: [{ required: true, message: "文本或数值不能为空不能为空", trigger: "blur" }],
|
||||||
|
resultType: [{ required: true, message: "默认保养结果不能为空", trigger: "blur" }],
|
||||||
|
|
||||||
minValue: [{ required: true, message: "最小值不能为空", trigger: "blur" }],
|
minValue: [{ required: true, message: "最小值不能为空", trigger: "blur" }],
|
||||||
maxValue: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
|
maxValue: [{ required: true, message: "最大值不能为空", trigger: "blur" }],
|
||||||
|
|
||||||
@@ -112,9 +123,13 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClear() {
|
||||||
|
this.dataForm.minValue = undefined
|
||||||
|
this.dataForm.maxValue = undefined
|
||||||
|
this.dataForm.maintainResult = undefined
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList();
|
const res = await getList();
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-07-19 14:47:02
|
* @LastEditTime: 2024-12-13 15:50:49
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -28,10 +28,8 @@ export default {
|
|||||||
activated() {
|
activated() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(obj) {
|
init(id) {
|
||||||
console.log(obj);
|
this.dataForm.id = id || "";
|
||||||
this.dataForm.id = obj.id || "";
|
|
||||||
this.dataForm.equipmentTypeId = obj.equipmentTypeId || "";
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if (this.urlOptions.getOption) {
|
if (this.urlOptions.getOption) {
|
||||||
this.getArr()
|
this.getArr()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-07-19 09:49:22
|
* @Date: 2024-07-19 09:49:22
|
||||||
* @LastEditTime: 2024-07-22 09:17:31
|
* @LastEditTime: 2024-12-13 15:52:24
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -88,12 +88,8 @@ export default {
|
|||||||
if (val.type === "edit") {
|
if (val.type === "edit") {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrEditTitle = "编辑"
|
this.addOrEditTitle = "编辑"
|
||||||
let obj = {
|
|
||||||
id: val.data.id,
|
|
||||||
equipmentTypeId:val.data.equipmentTypeId
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(obj);
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
});
|
});
|
||||||
} else if (val.type === "delete") {
|
} else if (val.type === "delete") {
|
||||||
this.deleteHandle(val.data.id, val.data.program, val.data._pageIndex)
|
this.deleteHandle(val.data.id, val.data.program, val.data._pageIndex)
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export default {
|
|||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.showDetailVisible = true
|
this.showDetailVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.showDetail.init(row.equipmentTypeId)
|
this.$refs.showDetail.init(row.id)
|
||||||
})
|
})
|
||||||
// alert('跳转到 保养记录')
|
// alert('跳转到 保养记录')
|
||||||
// console.log(row)
|
// console.log(row)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-07-12 13:28:21
|
* @Date: 2024-07-12 13:28:21
|
||||||
* @LastEditTime: 2024-07-23 14:00:38
|
* @LastEditTime: 2024-12-13 16:03:29
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||||
@confirm="handleConfirm" :before-close="handleCancel" width="30%">
|
@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>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
equipmentTypeId:null,
|
mainId:null,
|
||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
basePath: 'base/equipment-maintain-program',
|
basePath: 'base/equipment-maintain-program',
|
||||||
@@ -105,21 +105,18 @@ export default {
|
|||||||
},
|
},
|
||||||
getDataList(id) {
|
getDataList(id) {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
this.queryParams.equipmentTypeId = id
|
this.queryParams.mainId = id
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
this.urlOptions.getDataListURL(this.queryParams).then(response => {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.listQuery.total = response.data.total;
|
this.queryParams.total = response.data.total;
|
||||||
this.dataListLoading = false
|
this.dataListLoading = false
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.addOrUpdateVisible = true
|
this.addOrUpdateVisible = true
|
||||||
this.addOrEditTitle = '新增'
|
this.addOrEditTitle = '新增'
|
||||||
let obj = {
|
|
||||||
equipmentTypeId: this.queryParams.equipmentTypeId
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(obj)
|
this.$refs.addOrUpdate.init()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
|
|||||||
@@ -223,15 +223,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
this.http('/base/core-equipment/page', 'get', {
|
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||||
special: false,
|
console.log('data', data);
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 999,
|
|
||||||
}).then(({ data }) => {
|
|
||||||
this.$set(
|
this.$set(
|
||||||
this.searchBarFormConfig[0],
|
this.searchBarFormConfig[0],
|
||||||
'selectOptions',
|
'selectOptions',
|
||||||
(data?.list || []).map((item) => ({
|
(data || []).map((item) => ({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -184,16 +184,17 @@ export default {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
select: true, // TODO: or INPUT instead of SELECT
|
input: true, // TODO: or INPUT instead of SELECT
|
||||||
label: '负责人',
|
label: '负责人',
|
||||||
prop: 'responsible',
|
prop: 'responsible',
|
||||||
url: '/base/core-worker/listAll', // TODO: 班组
|
// url: 'system/user/page', // TODO: 班组
|
||||||
valueKey: 'name',
|
// valueKey: 'id',
|
||||||
bind: {
|
// labelKey:'username',
|
||||||
filterable: true,
|
// bind: {
|
||||||
clearable: true,
|
// filterable: true,
|
||||||
multiple: true
|
// clearable: true,
|
||||||
},
|
// multiple: true
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -288,7 +289,7 @@ export default {
|
|||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.info({ id }).then((response) => {
|
this.info({ id }).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.form.responsible = this.form.responsible ? this.form.responsible.split(',') : undefined
|
// this.form.responsible = this.form.responsible ? this.form.responsible.split(',') : undefined
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '修改备品备件配置';
|
this.title = '修改备品备件配置';
|
||||||
});
|
});
|
||||||
@@ -299,7 +300,7 @@ export default {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.form.responsible = this.form.responsible.join(',')
|
// this.form.responsible = this.form.responsible.join(',')/
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
this.put(this.form).then((response) => {
|
this.put(this.form).then((response) => {
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '备件名称',
|
label: '备件名称',
|
||||||
prop: 'productMaterialId',
|
prop: 'productMaterialId',
|
||||||
|
// url: '/base/core-product-material/listAll', // TODO: 供应商
|
||||||
options: [],
|
options: [],
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
@@ -403,19 +404,19 @@ export default {
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
const materRes = await getMaterialTree(); //
|
// const materRes = await getMaterialTree();
|
||||||
let typeId = materRes.data.find((item) => item.product === 2).id;
|
// let typeId = materRes.data.find((item) => item.product === 2);
|
||||||
const listQuery = {
|
// const listQuery = {
|
||||||
typeId: typeId,
|
// typeId: typeId,
|
||||||
};
|
// };
|
||||||
const materData = await getMaterialList(listQuery);
|
const materData = await getMaterialList();
|
||||||
this.rows[0][0].options = (materData.data || []).map((item) => ({
|
this.rows[0][0].options = (materData.data || []).filter(item => item.typeId === 3)
|
||||||
label: item.name,
|
.map(item => ({ label: item.name, value: item.id,...item }))
|
||||||
value: item.id,
|
console.log(this.rows[0][0].options);
|
||||||
...item
|
|
||||||
}));
|
|
||||||
},
|
},
|
||||||
updateDialogFormZ(val) {
|
updateDialogFormZ(val) {
|
||||||
|
// console.log(this.rows[0][0].options)
|
||||||
const selectData = this.rows[0][0].options.find(
|
const selectData = this.rows[0][0].options.find(
|
||||||
(item) => item.id === val.productMaterialId
|
(item) => item.id === val.productMaterialId
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ function getTodayStart(today) {
|
|||||||
|
|
||||||
/** 颜色配置 */
|
/** 颜色配置 */
|
||||||
const types = [
|
const types = [
|
||||||
{ name: '运行', color: '#288AFF' },
|
{ name: '运行', color: '#288AFF' },
|
||||||
{ name: '故障', color: '#FC9C91' },
|
|
||||||
{ name: '计划停机', color: '#FFDC94' },
|
{ name: '计划停机', color: '#FFDC94' },
|
||||||
|
{ name: '故障', color: '#FC9C91' },
|
||||||
{ name: '空白', color: '#F2F4F9' },
|
{ name: '空白', color: '#F2F4F9' },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ export default class GanttGraph {
|
|||||||
<span class="eq-name" style="margin-left: 4px;">${params.seriesName}</span>
|
<span class="eq-name" style="margin-left: 4px;">${params.seriesName}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="run-status" style="margin-left: 8px; opacity: 0.6">${params.name}</span>
|
<span class="run-status" style="margin-left: 8px; opacity: 0.6">${params.name}</span>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -251,7 +251,7 @@ export default class GanttGraph {
|
|||||||
y: 0,
|
y: 0,
|
||||||
},
|
},
|
||||||
data: arr.map(item => ({
|
data: arr.map(item => ({
|
||||||
name: ['运行', '故障', '计划停机'][item.status],
|
name: ['运行', '计划停机', '故障'][item.status],
|
||||||
value: [0, item.startTime, item.startTime + item.duration * 60 * 1000, 0],
|
value: [0, item.startTime, item.startTime + item.duration * 60 * 1000, 0],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: types[item.status].color,
|
color: types[item.status].color,
|
||||||
@@ -325,4 +325,4 @@ export default class GanttGraph {
|
|||||||
console.log(JSON.stringify(this.option, null, 2));
|
console.log(JSON.stringify(this.option, null, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,29 +6,19 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
||||||
class="status-timegraph-container"
|
<el-row class="" style="
|
||||||
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
|
|
||||||
<el-row
|
|
||||||
class=""
|
|
||||||
style="
|
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
">
|
">
|
||||||
<div class="blue-title">生产节拍时序图</div>
|
<div class="blue-title">生产节拍时序图</div>
|
||||||
<SearchBar
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true"
|
||||||
:formConfigs="searchBarFormConfig"
|
@select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
ref="search-bar"
|
</el-row>
|
||||||
:remove-blue="true"
|
|
||||||
@select-changed="handleSearchBarSelectChange"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row
|
<el-row class="" style="
|
||||||
class=""
|
|
||||||
style="
|
|
||||||
height: 1px;
|
height: 1px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
@@ -38,60 +28,40 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
">
|
">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="blue-title">设备状态时序图</div>
|
<div class="blue-title">设备状态时序图</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18" class="legend-row">
|
<el-col :span="18" class="legend-row">
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div class="icon running"></div>
|
<div class="icon running"></div>
|
||||||
<div>运行中</div>
|
<div>运行中</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div class="icon fault"></div>
|
<div class="icon stop"></div>
|
||||||
<div>故障</div>
|
<div>计划停机</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div class="icon stop"></div>
|
<div class="icon fault"></div>
|
||||||
<div>计划停机</div>
|
<div>故障</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div
|
<div class="main-area" style="flex: 1; display: flex; flex-direction: column">
|
||||||
class="main-area"
|
<div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div>
|
||||||
style="flex: 1; display: flex; flex-direction: column">
|
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
|
||||||
<div
|
</div>
|
||||||
class="graphs"
|
</el-row>
|
||||||
v-show="graphList.length"
|
|
||||||
id="status-chart"
|
|
||||||
style="height: 1px; flex: 1"></div>
|
|
||||||
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
|
|
||||||
</div>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
<!-- 对话框(添加 / 修改) -->
|
||||||
<base-dialog
|
<base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false"
|
||||||
dialogTitle="添加设备"
|
@confirm="submitForm">
|
||||||
:dialogVisible="open"
|
<el-select v-if="open" style="width: 100%" filterable clearable v-model="queryParams.equipmentId"
|
||||||
width="500px"
|
placeholder="请选择一个设备">
|
||||||
@close="open = false"
|
<el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option>
|
||||||
@cancel="open = false"
|
</el-select>
|
||||||
@confirm="submitForm">
|
</base-dialog>
|
||||||
<el-select
|
</div>
|
||||||
v-if="open"
|
|
||||||
style="width: 100%"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
v-model="queryParams.equipmentId"
|
|
||||||
placeholder="请选择一个设备">
|
|
||||||
<el-option
|
|
||||||
v-for="eq in eqList"
|
|
||||||
:key="eq.id"
|
|
||||||
:value="eq.id"
|
|
||||||
:label="eq.name"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -103,12 +73,6 @@ export default {
|
|||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
const today = new Date();
|
|
||||||
const todayStart = new Date(
|
|
||||||
today.getFullYear(),
|
|
||||||
today.getMonth(),
|
|
||||||
today.getDate()
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
chart: null,
|
chart: null,
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
@@ -138,7 +102,7 @@ export default {
|
|||||||
placeholder: '选择日期',
|
placeholder: '选择日期',
|
||||||
param: 'recordTime',
|
param: 'recordTime',
|
||||||
required: true,
|
required: true,
|
||||||
defaultSelect: moment(todayStart).format('YYYY-MM-DD HH:mm:ss'),
|
defaultSelect:null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -191,14 +155,24 @@ export default {
|
|||||||
// ],
|
// ],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created () {
|
||||||
this.initProductline();
|
this.initProductline();
|
||||||
this.initWorksection();
|
this.initWorksection();
|
||||||
this.initEquipment();
|
this.initEquipment();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
const today = new Date();
|
||||||
|
const todayStart = new Date(
|
||||||
|
today.getFullYear(),
|
||||||
|
today.getMonth(),
|
||||||
|
today.getDate()
|
||||||
|
);
|
||||||
|
this.searchBarFormConfig[2].defaultSelect = moment(todayStart).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
console.log('111111', this.searchBarFormConfig[2].defaultSelect)
|
||||||
// this.getList();
|
// this.getList();
|
||||||
},
|
},
|
||||||
mounted() {},
|
// mounted() {},
|
||||||
watch: {
|
watch: {
|
||||||
graphList: {
|
graphList: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
@@ -246,7 +220,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async getList() {
|
async getList() {
|
||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/monitoring/equipment-monitor/status-series',
|
url: '/monitoring/equipment-monitor/status-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@@ -312,7 +286,7 @@ export default {
|
|||||||
if (!value) {
|
if (!value) {
|
||||||
this.searchBarFormConfig[1].selectOptions = [];
|
this.searchBarFormConfig[1].selectOptions = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'lineId':
|
case 'lineId':
|
||||||
this.$axios({
|
this.$axios({
|
||||||
@@ -322,7 +296,8 @@ export default {
|
|||||||
id: value,
|
id: value,
|
||||||
},
|
},
|
||||||
}).then(({ code, data }) => {
|
}).then(({ code, data }) => {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
this.searchBarFormConfig[2].defaultSelect = null
|
||||||
this.searchBarFormConfig[1].selectOptions = data.map((item) => {
|
this.searchBarFormConfig[1].selectOptions = data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
filename: index.vue
|
filename: index.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
date: 2023-10-19 10:03:42
|
date: 2023-10-19 10:03:42
|
||||||
description:
|
description:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -189,7 +189,7 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '工艺编码',
|
label: '工艺编码',
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
// url: '/base/core-equipment/getCode',
|
url: '/extend/process-flow/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ const tableProps = [
|
|||||||
label: '班次状态',
|
label: '班次状态',
|
||||||
subcomponent: StatusBtn,
|
subcomponent: StatusBtn,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'remark',
|
// prop: 'remark',
|
||||||
label: '备注',
|
// label: '备注',
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
name: 'GroupClass',
|
name: 'GroupClass',
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 班次班组 -->
|
<!-- 班次班组 -->
|
||||||
<!-- class有两个样式,一个是类似class1,还有个是选中红框显示 -->
|
<!-- class有两个样式,一个是类似class1,还有个是选中红框显示 -->
|
||||||
<el-row
|
<!-- <el-row
|
||||||
:gutter="2"
|
:gutter="2"
|
||||||
:class="
|
:class="
|
||||||
'class' +
|
'class' +
|
||||||
@@ -92,6 +92,14 @@
|
|||||||
: '')
|
: '')
|
||||||
"
|
"
|
||||||
v-for="(item, index) in list[Number(data.day.split('-')[2])]"
|
v-for="(item, index) in list[Number(data.day.split('-')[2])]"
|
||||||
|
:key="index"> -->
|
||||||
|
<el-row
|
||||||
|
:gutter="2"
|
||||||
|
:class="
|
||||||
|
'class' +
|
||||||
|
(index + 1)
|
||||||
|
"
|
||||||
|
v-for="(item, index) in list[Number(data.day.split('-')[2])]"
|
||||||
:key="index">
|
:key="index">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="selectDiv">
|
<div class="selectDiv">
|
||||||
@@ -141,6 +149,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else style='font-size: 20px;font-weight: 500;text-align: right;'>
|
||||||
|
{{ Number(data.day.split('-')[2]) }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-calendar>
|
</el-calendar>
|
||||||
</div>
|
</div>
|
||||||
@@ -277,7 +288,7 @@ export default {
|
|||||||
if (
|
if (
|
||||||
moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM')
|
moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM')
|
||||||
) {
|
) {
|
||||||
num = Number(moment().format('DD'));
|
num = Number(moment().format('DD'))-1;
|
||||||
} else {
|
} else {
|
||||||
num = 0;
|
num = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -211,6 +211,9 @@ export default {
|
|||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
this.$emit('successSubmit');
|
this.$emit('successSubmit');
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
this.$emit('successSubmit');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -226,6 +229,9 @@ export default {
|
|||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
this.$emit('successSubmit');
|
this.$emit('successSubmit');
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
this.$modal.msgSuccess('操作成功');
|
||||||
|
this.$emit('successSubmit');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -176,8 +176,10 @@ export default {
|
|||||||
if (res.code === 0 && res.data.list && res.data.list.length > 0) {
|
if (res.code === 0 && res.data.list && res.data.list.length > 0) {
|
||||||
res.data.list.forEach(item => {
|
res.data.list.forEach(item => {
|
||||||
if(item.isProduction){
|
if(item.isProduction){
|
||||||
item.str = item.strList?item.strList.join(','):'-'
|
item.str = item.strList?item.strList.join(','):'-'
|
||||||
}
|
}else{
|
||||||
|
item.str = '-'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.list = res.data.list;
|
this.list = res.data.list;
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
|
|||||||
@@ -125,13 +125,15 @@ export default {
|
|||||||
addButtonShow: '',
|
addButtonShow: '',
|
||||||
planArr: [], //排班计划数组
|
planArr: [], //排班计划数组
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
|
||||||
startDay: [
|
startDay: [
|
||||||
{ required: true, message: '请选择排班开始时间', trigger: 'change' },
|
{ required: true, message: '请选择排班开始时间', trigger: 'change' },
|
||||||
],
|
],
|
||||||
endDay: [
|
endDay: [
|
||||||
{ required: true, message: '请选择排班结束时间', trigger: 'change' },
|
{ required: true, message: '请选择排班结束时间', trigger: 'change' },
|
||||||
],
|
],
|
||||||
|
planId:[
|
||||||
|
{ required: true, message: '请选择排班计划', trigger: 'change' },
|
||||||
|
]
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -231,6 +233,10 @@ export default {
|
|||||||
};
|
};
|
||||||
list.push(obj);
|
list.push(obj);
|
||||||
});
|
});
|
||||||
|
if (list.length === 0) {
|
||||||
|
this.$modal.msgError('班组上班顺序不能为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.form.list = list;
|
this.form.list = list;
|
||||||
updateGroupRule({ ...this.form }).then((res) => {
|
updateGroupRule({ ...this.form }).then((res) => {
|
||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
@@ -246,6 +252,10 @@ export default {
|
|||||||
};
|
};
|
||||||
list.push(obj);
|
list.push(obj);
|
||||||
});
|
});
|
||||||
|
if (list.length === 0) {
|
||||||
|
this.$modal.msgError('班组上班顺序不能为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.form.list = list;
|
this.form.list = list;
|
||||||
createGroupRule({ ...this.form }).then((res) => {
|
createGroupRule({ ...this.form }).then((res) => {
|
||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
@@ -268,13 +278,8 @@ export default {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
.min-title::before {
|
.min-title::before {
|
||||||
content: '';
|
content: "*";
|
||||||
display: inline-block;
|
color: #ff5454;
|
||||||
vertical-align: middle;
|
margin-right: 4px;
|
||||||
width: 6px;
|
|
||||||
height: 6px;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin: auto 5px;
|
|
||||||
background-color: #0b58ff;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ import {
|
|||||||
deleteGroupRule,
|
deleteGroupRule,
|
||||||
updateGroupRule,
|
updateGroupRule,
|
||||||
getGroupRule,
|
getGroupRule,
|
||||||
|
disableGroupRule
|
||||||
} from '@/api/base/groupSchedulingRule';
|
} from '@/api/base/groupSchedulingRule';
|
||||||
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
|
||||||
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
|
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
|
||||||
import { formatDate } from '@/utils';
|
import { formatDate } from '@/utils';
|
||||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||||
@@ -76,11 +78,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'select',
|
||||||
label: '班次',
|
label: '班次',
|
||||||
placeholder: '班次',
|
selectOptions: [],
|
||||||
param: 'name',
|
param: 'id',
|
||||||
|
defaultSelect: '',
|
||||||
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -154,19 +158,35 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
name: null,
|
id: null,
|
||||||
},
|
},
|
||||||
|
classNameList:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getClassNameList();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getClassNameList() {
|
||||||
|
groupClassesListAll().then((res) => {
|
||||||
|
this.formConfig[0].selectOptions = res.data;
|
||||||
|
this.classNameList = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.queryParams.classesName = val.name || undefined;
|
if (val.id) {
|
||||||
|
this.classNameList.map((item) => {
|
||||||
|
if (val.id === item.id) {
|
||||||
|
this.queryParams.classesName = item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.queryParams.classesName = ''
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -186,7 +206,7 @@ export default {
|
|||||||
formatDate(item.startDay) +
|
formatDate(item.startDay) +
|
||||||
'至' +
|
'至' +
|
||||||
(item.endDay ? formatDate(item.endDay) : '永久');
|
(item.endDay ? formatDate(item.endDay) : '永久');
|
||||||
item.str = item.strList.join(',');
|
item.str = item.strList.join(',');
|
||||||
});
|
});
|
||||||
this.list = res.data.list;
|
this.list = res.data.list;
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
@@ -231,14 +251,9 @@ export default {
|
|||||||
'是否确认作废序号为"' + row.planName + '"的数据项?'
|
'是否确认作废序号为"' + row.planName + '"的数据项?'
|
||||||
,'提示')
|
,'提示')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getGroupRule(row.id).then((response) => {
|
disableGroupRule(row.id).then((response) => {
|
||||||
let datas = response.data;
|
|
||||||
datas.list = datas.sequenceList;
|
|
||||||
datas.enabled = 0;
|
|
||||||
updateGroupRule(datas).then(() => {
|
|
||||||
_this.getList();
|
_this.getList();
|
||||||
_this.$modal.msgSuccess('操作成功');
|
_this.$modal.msgSuccess('操作成功');
|
||||||
});
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<base-table
|
<base-table
|
||||||
|
:page="1"
|
||||||
|
:limit="5000"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
:max-height="tableH"
|
:max-height="tableH"
|
||||||
@@ -43,7 +45,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workTime',
|
prop: 'workTime',
|
||||||
label: '工作时长'
|
label: '工作时长(h)'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'workOrderId',
|
param: 'workOrderId',
|
||||||
clearable: false,
|
clearable: false,
|
||||||
filterable: true
|
filterable: true,
|
||||||
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="80"
|
:width="80"
|
||||||
label="操作"
|
label="生产情况"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick"
|
@clickBtn="handleClick"
|
||||||
/>
|
/>
|
||||||
@@ -38,6 +38,7 @@ import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/t
|
|||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import TeamProductionDetail from './components/teamProductionDetail'
|
import TeamProductionDetail from './components/teamProductionDetail'
|
||||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||||
|
import moment from 'moment'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
@@ -53,14 +54,12 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
label: '上班时间',
|
label: '上班时间',
|
||||||
filter: parseTime,
|
filter: (val) => moment(val).format('HH:mm')
|
||||||
minWidth: 160
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'endTime',
|
prop: 'endTime',
|
||||||
label: '下班时间',
|
label: '下班时间',
|
||||||
filter: parseTime,
|
filter: (val) => moment(val).format('HH:mm')
|
||||||
minWidth: 160
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'classesName',
|
prop: 'classesName',
|
||||||
@@ -70,7 +69,8 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'teamName',
|
prop: 'teamName',
|
||||||
label: '班组名称',
|
label: '班组名称',
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true,
|
||||||
|
minWidth: 100
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
@@ -122,8 +122,8 @@ export default {
|
|||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:team-production:detail')
|
this.$auth.hasPermi('base:team-production:detail')
|
||||||
? {
|
? {
|
||||||
type: 'detail',
|
type: 'prodDetail',
|
||||||
btnName: '详情'
|
btnName: '查看'
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ import {
|
|||||||
} from "@/utils/constants";
|
} from "@/utils/constants";
|
||||||
import { getSpuSimpleList } from "@/api/mall/product/spu";
|
import { getSpuSimpleList } from "@/api/mall/product/spu";
|
||||||
import { parseTime } from "@/utils/ruoyi";
|
import { parseTime } from "@/utils/ruoyi";
|
||||||
import {changeRoleStatus} from "@/api/system/role";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PromotionCouponTemplate",
|
name: "PromotionCouponTemplate",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-08-14 15:24:11
|
* @LastEditTime: 2024-12-12 09:54:25
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" v-if="showTime">
|
<el-col :span="8" v-if="showTime">
|
||||||
<el-form-item label="生产单位用时" prop="processTime">
|
<el-form-item label="生产单位用时(s)" prop="processTime">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="dataForm.processTime"
|
v-model.number="dataForm.processTime"
|
||||||
type="number"
|
type="number"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2024-07-01 14:54:06
|
* @Date: 2024-07-01 14:54:06
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-08-21 11:19:51
|
* @LastEditTime: 2024-12-16 10:03:30
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -346,6 +346,7 @@ export default {
|
|||||||
this.listQuery.typeId = data.id || undefined;
|
this.listQuery.typeId = data.id || undefined;
|
||||||
this.listQuery.product = data.product;
|
this.listQuery.product = data.product;
|
||||||
this.$refs.searchBarForm.formInline.type = data.name || undefined;
|
this.$refs.searchBarForm.formInline.type = data.name || undefined;
|
||||||
|
this.getDataList()
|
||||||
},
|
},
|
||||||
// 新增节点
|
// 新增节点
|
||||||
append(data) {
|
append(data) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-10-14 09:26:53
|
* @LastEditTime: 2024-12-12 16:13:11
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -41,18 +41,19 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料批次" prop="materialDateId">
|
<el-form-item label="物料批次" prop="materialDate">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.materialDateId"
|
v-model="dataForm.materialDate"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
|
allow-create
|
||||||
placeholder="请选择物料批次"
|
placeholder="请选择物料批次"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in materialDateList"
|
v-for="dict in materialDateList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
:label="dict.code"
|
:label="dict.code"
|
||||||
:value="dict.id" />
|
:value="dict.code" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -147,7 +148,7 @@ import {
|
|||||||
getMaterialLog,
|
getMaterialLog,
|
||||||
getEqListAll,
|
getEqListAll,
|
||||||
} from '@/api/base/materialUseLog';
|
} from '@/api/base/materialUseLog';
|
||||||
import { getMaterialTree,getMaterialList } from '@/api/base/material';
|
import { getMaterialTree, getMaterialList } from '@/api/base/material';
|
||||||
import { getMaterDateList } from '@/api/base/materialDate';
|
import { getMaterDateList } from '@/api/base/materialDate';
|
||||||
import { listSimpleUsers } from '@/api/system/user';
|
import { listSimpleUsers } from '@/api/system/user';
|
||||||
|
|
||||||
@@ -164,7 +165,7 @@ export default {
|
|||||||
id: undefined,
|
id: undefined,
|
||||||
materialId: undefined,
|
materialId: undefined,
|
||||||
materialCode: undefined,
|
materialCode: undefined,
|
||||||
materialDateId: undefined,
|
materialDate: undefined,
|
||||||
equipmentId: undefined,
|
equipmentId: undefined,
|
||||||
userName: undefined,
|
userName: undefined,
|
||||||
userNames: [],
|
userNames: [],
|
||||||
@@ -208,15 +209,17 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async getDictData() {
|
async getDictData() {
|
||||||
const materRes = await getMaterialTree(); //
|
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= {
|
const listQuery = {
|
||||||
typeId:typeId
|
typeId: typeId,
|
||||||
}
|
};
|
||||||
const materData = await getMaterialList(listQuery);
|
const materData = await getMaterialList(listQuery);
|
||||||
this.materialList = [];
|
this.materialList = [];
|
||||||
this.materialList = materData.data;
|
this.materialList = materData.data;
|
||||||
const dateRes = await getMaterDateList();
|
if (!this.dataForm.id) {
|
||||||
this.materialDateList = dateRes.data;
|
const dateRes = await getMaterDateList();
|
||||||
|
this.materialDateList = dateRes.data;
|
||||||
|
}
|
||||||
const eqRes = await getEqListAll();
|
const eqRes = await getEqListAll();
|
||||||
this.eqList = eqRes.data;
|
this.eqList = eqRes.data;
|
||||||
const workerRes = await listSimpleUsers();
|
const workerRes = await listSimpleUsers();
|
||||||
@@ -257,7 +260,7 @@ export default {
|
|||||||
this.dataForm.id = response.data.id;
|
this.dataForm.id = response.data.id;
|
||||||
this.dataForm.materialCode = response.data.materialCode;
|
this.dataForm.materialCode = response.data.materialCode;
|
||||||
this.dataForm.materialId = response.data.materialId;
|
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.equipmentId = response.data.equipmentId;
|
||||||
this.dataForm.useTime = response.data.useTime;
|
this.dataForm.useTime = response.data.useTime;
|
||||||
// this.dataForm.userName = response.data.userName
|
// this.dataForm.userName = response.data.userName
|
||||||
@@ -265,6 +268,11 @@ export default {
|
|||||||
this.dataForm.source = response.data.source;
|
this.dataForm.source = response.data.source;
|
||||||
this.dataForm.remark = response.data.remark;
|
this.dataForm.remark = response.data.remark;
|
||||||
this.dataForm.userNames = response.data.userName.split(',');
|
this.dataForm.userNames = response.data.userName.split(',');
|
||||||
|
getMaterDateList({ materialId: this.dataForm.materialId }).then(
|
||||||
|
(res) => {
|
||||||
|
this.materialDateList = res.data;
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,13 @@ export default {
|
|||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '返回',
|
||||||
|
name: 'return',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
@@ -278,19 +284,24 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleSearchBarBtnClick({ btnName, timeVal }) {
|
async handleSearchBarBtnClick({ btnName, timeVal }) {
|
||||||
if (timeVal && timeVal.length > 0) {
|
console.log(btnName);
|
||||||
console.log('nihc ', timeVal)
|
if (btnName === 'search') {
|
||||||
if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 30 * 60 * 1000) {
|
if (timeVal && timeVal.length > 0) {
|
||||||
this.queryParams.recordTime = timeVal;
|
console.log('nihc ', timeVal)
|
||||||
await this.handleQuery();
|
if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 30 * 60 * 1000) {
|
||||||
} else {
|
this.queryParams.recordTime = timeVal;
|
||||||
this.$message.warning('时间范围最大30分钟限制!')
|
await this.handleQuery();
|
||||||
}
|
} else {
|
||||||
} else {
|
this.$message.warning('时间范围最大30分钟限制!')
|
||||||
this.queryParams.recordTime = [];
|
}
|
||||||
this.$message.warning('时间段必选!')
|
} else {
|
||||||
}
|
this.queryParams.recordTime = [];
|
||||||
|
this.$message.warning('时间段必选!')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$router.go(-1)
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,304 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-form ref="addWorkOrder" :rules="rules" label-width="130px" :model="form" label-position='top'>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
|
||||||
<el-input v-model="form.name"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
|
||||||
<el-option
|
|
||||||
v-for="item in workOrderList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="工单编码" prop="code">
|
|
||||||
<el-input v-model="form.code" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
|
||||||
<el-option
|
|
||||||
v-for="item in productList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name+' | '+item.specifications"
|
|
||||||
:value="item.id">
|
|
||||||
<span style="float: left">{{ item.name }}</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划开始时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="planStartTime"
|
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划完成时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="planFinishTime"
|
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" disabled style="width: 100%;">
|
|
||||||
<el-option
|
|
||||||
v-for="item in processFlowList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" disabled>
|
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="优先级" prop="priority">
|
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
|
||||||
<el-option
|
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="工单类型" prop="type">
|
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
|
||||||
<el-option
|
|
||||||
v-for="item in workOrderTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
|
||||||
<el-option
|
|
||||||
v-for="item in productLineList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="负责人" prop="workers">
|
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getProductAll } from '@/api/base/product'
|
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
|
||||||
import moment from 'moment'
|
|
||||||
export default {
|
|
||||||
name: 'AddWorkOrder',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
form: {
|
|
||||||
workOrderId: '',
|
|
||||||
orderId: '',
|
|
||||||
name: '',
|
|
||||||
code: '',
|
|
||||||
planProductId: '',
|
|
||||||
planStartTime: '',
|
|
||||||
planFinishTime: '',
|
|
||||||
planAssignQuantity: 0,
|
|
||||||
planQuantity: 0,
|
|
||||||
processFlowId: '',
|
|
||||||
materialMethod: 1,
|
|
||||||
priority: '',
|
|
||||||
productLineId: [],
|
|
||||||
type: '',
|
|
||||||
workers: '',
|
|
||||||
planAssignmentQuantity: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
|
|
||||||
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
|
|
||||||
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
|
||||||
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
|
||||||
productLineId: [{ required: true, message: "产线不能为空", trigger: "change" }],
|
|
||||||
planAssignmentQuantity: [{ required: true, message: "计划分配订单量不能为空", trigger: "blur" }]
|
|
||||||
},
|
|
||||||
productList: [],
|
|
||||||
processFlowList: [],
|
|
||||||
productLineList: [],
|
|
||||||
workOrderTypeList: [
|
|
||||||
{id: 1,name:'标准工单'},
|
|
||||||
{id: 2, name:'特殊工单'}
|
|
||||||
],
|
|
||||||
planStartTime: '',
|
|
||||||
planFinishTime: '',
|
|
||||||
isBind: false,
|
|
||||||
workOrderList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init(data, param) {
|
|
||||||
this.form.orderId = data.id
|
|
||||||
this.getList()
|
|
||||||
if (param === 'add') {
|
|
||||||
this.isBind = false
|
|
||||||
getWorkOrderCode().then(res => {
|
|
||||||
this.form.code = res.data || ''
|
|
||||||
})
|
|
||||||
this.form.planProductId = data.planProductId
|
|
||||||
this.form.processFlowId = data.processFlowId
|
|
||||||
this.form.materialMethod = data.materialMethod
|
|
||||||
}else{//绑定
|
|
||||||
this.isBind = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
// 产品
|
|
||||||
getProductAll().then(res => {
|
|
||||||
this.productList = res.data || []
|
|
||||||
})
|
|
||||||
// 产线
|
|
||||||
getLineAll().then(res => {
|
|
||||||
this.productLineList = res.data || []
|
|
||||||
})
|
|
||||||
// 工艺
|
|
||||||
getProcessFlowList().then(res => {
|
|
||||||
this.processFlowList = res.data || []
|
|
||||||
})
|
|
||||||
// 工单list
|
|
||||||
workOrderList({
|
|
||||||
status: 1
|
|
||||||
}).then(res => {
|
|
||||||
this.workOrderList = res.data || []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
addWorkOrderSubmit() {
|
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.isBind) {
|
|
||||||
//绑定工单
|
|
||||||
orderIssue({
|
|
||||||
workOrderId: this.form.workOrderId,
|
|
||||||
orderId: this.form.orderId,
|
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$modal.msgSuccess("操作成功")
|
|
||||||
this.$emit('addWorkOrderSubmit')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 新增工单
|
|
||||||
let _this = this
|
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
_this.$modal.msgSuccess("操作成功")
|
|
||||||
let name = this.form.name
|
|
||||||
_this.$emit('addWorkOrderSubmit')
|
|
||||||
// 询问是否添加预使用主原料
|
|
||||||
_this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
|
||||||
_this.$router.push({
|
|
||||||
path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
formClear() {
|
|
||||||
this.$refs.addWorkOrder.resetFields()
|
|
||||||
this.form.materialMethod = 1
|
|
||||||
this.form.planAssignQuantity = 0
|
|
||||||
this.form.planQuantity = 0
|
|
||||||
this.planFinishTime = ''
|
|
||||||
this.planStartTime = ''
|
|
||||||
this.form.planFinishTime = ''
|
|
||||||
this.form.planStartTime = ''
|
|
||||||
this.isBind = false
|
|
||||||
},
|
|
||||||
// 绑定工单,选择工单时获取工单信息
|
|
||||||
getWorkOrderMsg() {
|
|
||||||
if (this.form.workOrderId) {
|
|
||||||
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.form.code = res.data.code
|
|
||||||
this.form.planProductId = res.data.planProductId
|
|
||||||
this.planStartTime = res.data.planStartTime ? moment.unix(res.data.planStartTime).format('YYYY-MM-DD HH:mm:ss') : null
|
|
||||||
this.planFinishTime = res.data.planFinishTime ? moment.unix(res.data.planFinishTime).format('YYYY-MM-DD HH:mm:ss') : null
|
|
||||||
this.form.planAssignQuantity = res.data.planAssignQuantity
|
|
||||||
this.form.planQuantity = res.data.planQuantity
|
|
||||||
this.form.processFlowId = res.data.processFlowId
|
|
||||||
this.form.materialMethod = res.data.materialMethod
|
|
||||||
this.form.priority = res.data.priority ? res.data.priority + '' : ''
|
|
||||||
this.form.productLineId = res.data.productLineIds
|
|
||||||
this.form.type = res.data.type
|
|
||||||
this.form.workers = res.data.workers
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,293 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-form ref="orderAddForm" :rules="rules" label-width="130px" :model="form" label-position='top'>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="订单名称" prop="name">
|
|
||||||
<el-input v-model="form.name"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="订单号" prop="code">
|
|
||||||
<el-input v-model="form.code"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划加工数量" prop="planQuantity">
|
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in productList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name+' | '+(item.specifications || '')"
|
|
||||||
:value="item.id">
|
|
||||||
<span style="float: left">{{ item.name }}</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="单价" prop="price">
|
|
||||||
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="客户" prop="customerId">
|
|
||||||
<el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;" clearable filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in customerList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="优先级" prop="priority">
|
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="包装规格" prop="packSpec">
|
|
||||||
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="负责人" prop="workers">
|
|
||||||
<el-input v-model="form.workers"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" style="width: 100%;" clearable filterable @change="processFlowIdChange">
|
|
||||||
<el-option
|
|
||||||
v-for="item in processFlowList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" @change='materialMethodChange'>
|
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="订单计划开始时间" prop="planStartTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.planStartTime"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 100%;"
|
|
||||||
value-format="timestamp"
|
|
||||||
@change="timeChange"
|
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="订单计划完成时间" prop="planFinishTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.planFinishTime"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 100%;"
|
|
||||||
value-format="timestamp"
|
|
||||||
@change="timeChange"
|
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='12'>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- <el-row>
|
|
||||||
<el-col :span='24'>
|
|
||||||
<el-form-item label="描述信息" prop="description">
|
|
||||||
<el-input v-model="form.description"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row> -->
|
|
||||||
</el-form>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getOrderCode, getOrderById, getProcessFlowList, orderUpdate, orderCreate } from '@/api/base/orderManage'
|
|
||||||
import { getProductAll } from '@/api/base/product'
|
|
||||||
import { getCustomerList } from '@/api/base/customer'
|
|
||||||
export default {
|
|
||||||
name: 'OrderAdd',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
form: {
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
code: '',
|
|
||||||
planQuantity: '',
|
|
||||||
planProductId: '',
|
|
||||||
price: '',
|
|
||||||
customerId: '',
|
|
||||||
priority: '',
|
|
||||||
packSpec: '',
|
|
||||||
workers: '',
|
|
||||||
processFlowId: '',
|
|
||||||
materialMethod: 1,
|
|
||||||
remark: '',
|
|
||||||
// description: '',
|
|
||||||
planStartTime: '',
|
|
||||||
planFinishTime: ''
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
|
|
||||||
code: [{ required: true, message: "订单号不能为空", trigger: "blur" }],
|
|
||||||
planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
|
|
||||||
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }]
|
|
||||||
},
|
|
||||||
productList: [],
|
|
||||||
customerList: [],
|
|
||||||
processFlowList: [],
|
|
||||||
isEdit: false //是否是编辑
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init(id) {
|
|
||||||
this.getList()
|
|
||||||
if (id) {
|
|
||||||
this.isEdit = true
|
|
||||||
this.form.id = id
|
|
||||||
getOrderById({id: this.form.id}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.form.name = res.data.name
|
|
||||||
this.form.code = res.data.code
|
|
||||||
this.form.planQuantity = res.data.planQuantity
|
|
||||||
this.form.planProductId = res.data.planProductId
|
|
||||||
this.form.price = res.data.price
|
|
||||||
this.form.customerId = res.data.customerId
|
|
||||||
this.form.priority = res.data.priority ? res.data.priority + '' : ''
|
|
||||||
this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
|
|
||||||
this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
|
|
||||||
this.form.workers = res.data.workers
|
|
||||||
this.form.processFlowId = res.data.processFlowId
|
|
||||||
this.form.materialMethod = res.data.materialMethod
|
|
||||||
this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null
|
|
||||||
this.form.remark = res.data.remark
|
|
||||||
// this.form.description = res.data.description
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.isEdit = false
|
|
||||||
this.form.id = ''
|
|
||||||
// 订单号
|
|
||||||
getOrderCode().then(res => {
|
|
||||||
this.form.code = res.data || ''
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
// 产品
|
|
||||||
getProductAll().then(res => {
|
|
||||||
this.productList = res.data || []
|
|
||||||
})
|
|
||||||
// 客户
|
|
||||||
getCustomerList().then(res => {
|
|
||||||
this.customerList = res.data || []
|
|
||||||
})
|
|
||||||
// 工艺
|
|
||||||
getProcessFlowList().then(res => {
|
|
||||||
this.processFlowList = res.data || []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
timeChange() {
|
|
||||||
if (this.form.planStartTime && this.form.planFinishTime) {
|
|
||||||
if (this.form.planStartTime > this.form.planFinishTime) {
|
|
||||||
this.$modal.msgError('计划开始时间不能大于结束时间')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 工艺变更
|
|
||||||
materialMethodChange(val) {
|
|
||||||
if (val === 2 && !this.form.processFlowId) {
|
|
||||||
this.form.materialMethod = 1
|
|
||||||
this.$modal.msgError("请先选择关联工艺");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 工艺变更
|
|
||||||
processFlowIdChange(val) {
|
|
||||||
console.log(val)
|
|
||||||
if (!val) {
|
|
||||||
this.form.materialMethod = 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
submitForm() {
|
|
||||||
this.$refs['orderAddForm'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.planStartTime && this.form.planFinishTime) {
|
|
||||||
if (this.form.planStartTime > this.form.planFinishTime) {
|
|
||||||
this.$modal.msgError('计划开始时间不能大于结束时间')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log(this.form)
|
|
||||||
if (this.isEdit) {
|
|
||||||
//编辑
|
|
||||||
orderUpdate({ ...this.form }).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$modal.msgSuccess("操作成功");
|
|
||||||
this.$emit('successSubmit')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.form.status = 1
|
|
||||||
this.form.triggerOrigin = 1
|
|
||||||
orderCreate({ ...this.form }).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$modal.msgSuccess("操作成功");
|
|
||||||
this.$emit('successSubmit')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
formClear() {
|
|
||||||
this.$refs.orderAddForm.resetFields()
|
|
||||||
this.form.materialMethod = 1
|
|
||||||
this.form.price = 0.00
|
|
||||||
this.form.planQuantity = 0
|
|
||||||
this.isEdit = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,470 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<search-bar
|
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="240"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
|
||||||
<pagination
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 新增&编辑 -->
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="addOrEditTitle"
|
|
||||||
:dialogVisible="centervisible"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
@confirm="handleConfirm"
|
|
||||||
:before-close="handleCancel"
|
|
||||||
width='60%'
|
|
||||||
>
|
|
||||||
<order-add ref="orderAdd" @successSubmit="successSubmit" />
|
|
||||||
</base-dialog>
|
|
||||||
<!-- 查看详情 -->
|
|
||||||
<!-- 新增工单 -->
|
|
||||||
<base-dialog
|
|
||||||
:dialogTitle="workIssueTitle"
|
|
||||||
:dialogVisible="addWorkOrdervisible"
|
|
||||||
@cancel="addWorkOrderCancel"
|
|
||||||
@confirm="addWorkOrderConfirm"
|
|
||||||
:before-close="addWorkOrderCancel"
|
|
||||||
width='70%'
|
|
||||||
>
|
|
||||||
<add-work-order ref="addWorkOrder" @addWorkOrderSubmit="addWorkOrderSubmit" />
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
|
||||||
import { getOrderPage, orderDelete, customerList, orderFinish } from '@/api/base/orderManage'
|
|
||||||
import OrderAdd from './components/orderAdd'
|
|
||||||
import AddWorkOrder from './components/addWorkOrder'
|
|
||||||
import { publicFormatter } from '@/utils/dict'
|
|
||||||
const tableProps = [
|
|
||||||
{
|
|
||||||
prop: 'createTime',
|
|
||||||
label: '添加时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '订单名称',
|
|
||||||
minWidth: 120,
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'code',
|
|
||||||
label: '订单编码',
|
|
||||||
minWidth: 180
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'customerId',
|
|
||||||
label: '客户',
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'triggerOrigin',
|
|
||||||
label: '来源',
|
|
||||||
filter: publicFormatter('order_Origin')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'priority',
|
|
||||||
label: '优先级',
|
|
||||||
filter: publicFormatter('order_priority')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'status',
|
|
||||||
label: '订单状态',
|
|
||||||
filter: publicFormatter('order_status')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'planQuantity',
|
|
||||||
label: '计划加工量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'actualQuantity',
|
|
||||||
label: '实际加工量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'productName',
|
|
||||||
label: '产品',
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'unit',
|
|
||||||
label: '单位',
|
|
||||||
filter: publicFormatter('unit_dict')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'price',
|
|
||||||
label: '单价(元)',
|
|
||||||
align: 'right'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'workOrderNum',
|
|
||||||
label: '工单数量'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default {
|
|
||||||
name: 'OrderManage',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formConfig: [
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '订单名称',
|
|
||||||
placeholder: '订单名称',
|
|
||||||
param: 'name'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '状态',
|
|
||||||
selectOptions: this.getDictDatas(this.DICT_TYPE.ORDER_STATUS),
|
|
||||||
labelField: 'label',
|
|
||||||
valueField: 'value',
|
|
||||||
param: 'status'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'datePicker',
|
|
||||||
label: '时间段',
|
|
||||||
dateType: 'daterange',
|
|
||||||
format: 'yyyy-MM-dd',
|
|
||||||
valueFormat: "yyyy-MM-dd",
|
|
||||||
rangeSeparator: '-',
|
|
||||||
startPlaceholder: '开始时间',
|
|
||||||
endPlaceholder: '结束时间',
|
|
||||||
param: 'timeVal',
|
|
||||||
defaultSelect: [],
|
|
||||||
width: 250
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:order-manage:create') ? 'separate' : '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('base:order-manage:create') ? 'button' : '',
|
|
||||||
btnName: '新增',
|
|
||||||
name: 'add',
|
|
||||||
color: 'success',
|
|
||||||
plain: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
name: null,
|
|
||||||
status: null,
|
|
||||||
lastIssuedTime: []
|
|
||||||
},
|
|
||||||
total: 0,
|
|
||||||
tableProps,
|
|
||||||
list: [],
|
|
||||||
tableH: this.tableHeight(260),
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:order-manage:addWorkOrder')
|
|
||||||
? {
|
|
||||||
type: 'add',
|
|
||||||
btnName: '新增',
|
|
||||||
showTip: '新增工单',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:bindWorkOrder')
|
|
||||||
? {
|
|
||||||
type: 'bind',
|
|
||||||
btnName: '绑定',
|
|
||||||
showTip: '绑定工单',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:bindWorkOrder')
|
|
||||||
? {
|
|
||||||
type: 'complete',
|
|
||||||
btnName: '完成',
|
|
||||||
showTip: '完成订单',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:detail')
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '详情'
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:edit')
|
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'triggerOrigin',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-manage:delete')
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'triggerOrigin',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'equal',
|
|
||||||
name: 'status',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined
|
|
||||||
].filter((v) => v),
|
|
||||||
addOrEditTitle: '',
|
|
||||||
centervisible: false,
|
|
||||||
priorityList: this.getDictDatas(this.DICT_TYPE.ORDER_PRIORITY),
|
|
||||||
workIssueTitle: '',
|
|
||||||
addWorkOrdervisible: false,
|
|
||||||
orderDetailVisible: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: { OrderAdd, AddWorkOrder },
|
|
||||||
created() {
|
|
||||||
window.addEventListener('resize', () => {
|
|
||||||
this.tableH = this.tableHeight(260)
|
|
||||||
})
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getList() {
|
|
||||||
getOrderPage({...this.queryParams}).then(res => {
|
|
||||||
let arr = res.data.records || []
|
|
||||||
this.total = res.data.total || 0
|
|
||||||
if (arr.length > 0) {
|
|
||||||
customerList().then(result => {
|
|
||||||
let tempData = result.data || []
|
|
||||||
if (tempData.length > 0) {
|
|
||||||
arr.map(item => {
|
|
||||||
for (let i of tempData) {
|
|
||||||
if (item.customerId === i.id) {
|
|
||||||
item.customerId = i.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
item.price = item.price.toFixed(2)
|
|
||||||
})
|
|
||||||
this.list = arr
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else {
|
|
||||||
this.list = arr
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
buttonClick(val) {
|
|
||||||
console.log(val)
|
|
||||||
if (val.btnName === 'search') {
|
|
||||||
this.queryParams.name = val.name
|
|
||||||
this.queryParams.status = val.status
|
|
||||||
if (val.timeVal && val.timeVal.length > 0) {
|
|
||||||
this.queryParams.lastIssuedTime[0] = val.timeVal[0] + ' 00:00:00'
|
|
||||||
this.queryParams.lastIssuedTime[1] = val.timeVal[1] + ' 23:59:59'
|
|
||||||
} else {
|
|
||||||
this.queryParams.lastIssuedTime = []
|
|
||||||
}
|
|
||||||
this.getList()
|
|
||||||
} else {
|
|
||||||
this.addOrEditTitle = '新增'
|
|
||||||
this.centervisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.orderAdd.init()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleClick(val) {
|
|
||||||
console.log(val)
|
|
||||||
switch (val.type) {
|
|
||||||
case 'edit':
|
|
||||||
this.addOrEditTitle = '编辑'
|
|
||||||
this.centervisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.orderAdd.init(val.data.id)
|
|
||||||
})
|
|
||||||
break
|
|
||||||
case 'delete':
|
|
||||||
this.handleDelete(val.data)
|
|
||||||
break
|
|
||||||
case 'detail':
|
|
||||||
this.$router.push({path: '/order/base/order-manage/order-detail-data?orderId='+ val.data.id})
|
|
||||||
break
|
|
||||||
case 'add':
|
|
||||||
this.workIssueTitle = '新增工单'
|
|
||||||
this.addWorkOrdervisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.addWorkOrder.init(val.data, 'add')
|
|
||||||
})
|
|
||||||
break
|
|
||||||
case 'bind':
|
|
||||||
this.workIssueTitle = '绑定工单'
|
|
||||||
this.addWorkOrdervisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.addWorkOrder.init(val.data, 'bind')
|
|
||||||
})
|
|
||||||
break
|
|
||||||
case 'complete':
|
|
||||||
this.handleComplete(val.data)
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 删除
|
|
||||||
handleDelete(val) {
|
|
||||||
this.$modal.confirm('是否确认删除"' + val.name + '"的数据项?').then(function() {
|
|
||||||
return orderDelete({ id: val.id })
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("操作成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
// 完成
|
|
||||||
handleComplete(val) {
|
|
||||||
this.$modal.confirm('是否确认完成订单"' + val.name + '"?').then(function() {
|
|
||||||
return orderFinish({ id: val.id })
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("操作成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
// 新增
|
|
||||||
handleCancel() {
|
|
||||||
this.$refs.orderAdd.formClear()
|
|
||||||
this.centervisible = false
|
|
||||||
this.addOrEditTitle = ''
|
|
||||||
},
|
|
||||||
handleConfirm() {
|
|
||||||
this.$refs.orderAdd.submitForm()
|
|
||||||
},
|
|
||||||
successSubmit() {
|
|
||||||
this.handleCancel()
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
// 下发新增
|
|
||||||
addWorkOrderCancel() {
|
|
||||||
this.$refs.addWorkOrder.formClear()
|
|
||||||
this.addWorkOrdervisible = false
|
|
||||||
},
|
|
||||||
addWorkOrderConfirm() {
|
|
||||||
this.$refs.addWorkOrder.addWorkOrderSubmit()
|
|
||||||
},
|
|
||||||
addWorkOrderSubmit() {
|
|
||||||
this.addWorkOrderCancel()
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
// bindWorkOrderCancel() {
|
|
||||||
// this.$refs.bindWorkOrder.formClear()
|
|
||||||
// this.bindWorkOrdervisible = false
|
|
||||||
// },
|
|
||||||
// bindWorkOrderConfirm() {
|
|
||||||
// this.$refs.bindWorkOrder.bindWorkOrderSubmit()
|
|
||||||
// },
|
|
||||||
// bindWorkOrderSubmit() {
|
|
||||||
// this.bindWorkOrderCancel()
|
|
||||||
// this.getList()
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,343 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="orderDetailData">
|
|
||||||
<div class="box1">
|
|
||||||
<div class="boxTitle">
|
|
||||||
<span class="blueTitle"></span>
|
|
||||||
<span>订单编码: {{orderMsg.code}}</span>
|
|
||||||
</div>
|
|
||||||
<el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
|
||||||
<div style="padding-left: 14px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">订单名</div>
|
|
||||||
<div class="lightTip">{{orderMsg.name}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">产品信息</div>
|
|
||||||
<div class="lightTip">{{orderMsg.productName}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">产品规格</div>
|
|
||||||
<div class="lightTip">{{orderMsg.specifications}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">客户</div>
|
|
||||||
<div class="lightTip">{{orderMsg.customerName}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">包装规格</div>
|
|
||||||
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec)}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">物料计算方式</div>
|
|
||||||
<div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">创建时间</div>
|
|
||||||
<div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">计划开始时间</div>
|
|
||||||
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">计划完成时间</div>
|
|
||||||
<div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">计划加工数量</div>
|
|
||||||
<div class="lightTip">{{orderMsg.planQuantity}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
|
||||||
<div class="lightTip">{{orderMsg.planArea}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">预计用时(时)</div>
|
|
||||||
<div class="lightTip">{{ orderMsg.expectTime }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">状态</div>
|
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status)}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">实际开始时间</div>
|
|
||||||
<div class="lightTip">{{ parseTime(orderMsg.startProduceTime) }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">实际完成时间</div>
|
|
||||||
<div class="lightTip">{{ parseTime(orderMsg.finishProduceTime) }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">实际生产数量</div>
|
|
||||||
<div class="lightTip">{{orderMsg.actualQuantity }}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">完成比%</div>
|
|
||||||
<div class="lightTip">{{orderMsg.completeProp}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">废片数量</div>
|
|
||||||
<div class="lightTip">{{orderMsg.nokQuantity}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">负责人</div>
|
|
||||||
<div class="lightTip">{{orderMsg.workers}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span='3'>
|
|
||||||
<div class="blodTip">关联工艺</div>
|
|
||||||
<div class="lightTip">{{processFlowName}}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="box2">
|
|
||||||
<div class="boxTitle">
|
|
||||||
<span class="blueTitle"></span>
|
|
||||||
<span>工单信息</span>
|
|
||||||
</div>
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps1"
|
|
||||||
:table-data="list1"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="box3">
|
|
||||||
<div class="boxTitle">
|
|
||||||
<span class="blueTitle"></span>
|
|
||||||
<span>预计用料信息</span>
|
|
||||||
</div>
|
|
||||||
<!-- 列表 -->
|
|
||||||
<base-table
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps2"
|
|
||||||
:table-data="list2"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
|
||||||
import { publicFormatter } from '@/utils/dict'
|
|
||||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
|
||||||
const tableProps1 = [
|
|
||||||
{
|
|
||||||
prop: 'issueTime',
|
|
||||||
label: '下发时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '工单名',
|
|
||||||
minWidth: 100,
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'code',
|
|
||||||
label: '工单编码',
|
|
||||||
minWidth: 150
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'planAssignmentQuantity',
|
|
||||||
label: '计划加工量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'actualQuantity',
|
|
||||||
label: '实际加工量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'actualArea',
|
|
||||||
label: '加工平方数',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'status',
|
|
||||||
label: '状态',
|
|
||||||
filter: publicFormatter('order_status')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'startProduceTime',
|
|
||||||
label: '开始时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'finishProduceTime',
|
|
||||||
label: '结束时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'productLineNames',
|
|
||||||
label: '关联产线',
|
|
||||||
filter: (val) => val ? val.join(',') : '',
|
|
||||||
showOverflowtooltip: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'workers',
|
|
||||||
label: '负责人'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'remark',
|
|
||||||
label: '备注'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
const tableProps2 = [
|
|
||||||
{
|
|
||||||
prop: 'materialName',
|
|
||||||
label: '物料名称'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'unit',
|
|
||||||
label: '单位',
|
|
||||||
filter: publicFormatter('unit_dict')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'num',
|
|
||||||
label: '剩余生产预计消耗'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
import { orderDetail, bomUseNum } from '@/api/base/orderManage'
|
|
||||||
export default {
|
|
||||||
name: 'OrderDetailData',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
orderId: '',
|
|
||||||
tableProps1,
|
|
||||||
tableProps2,
|
|
||||||
list1: [],
|
|
||||||
list2: [],
|
|
||||||
tableH: this.tableHeight(510) / 2,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 500
|
|
||||||
},
|
|
||||||
orderMsg: {},
|
|
||||||
processFlowName: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
window.addEventListener('resize', () => {
|
|
||||||
this.tableH = this.tableHeight(510) / 2
|
|
||||||
})
|
|
||||||
this.orderId = location.href.split('?')[1].split('=')[1]
|
|
||||||
this.getMsg()
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route: 'initData'
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData(to) {
|
|
||||||
if (to.name === 'OrderDetailData') {
|
|
||||||
this.orderId = location.href.split('?')[1].split('=')[1]
|
|
||||||
this.getMsg()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getMsg() {
|
|
||||||
orderDetail({
|
|
||||||
id: this.orderId
|
|
||||||
}).then(res => {
|
|
||||||
this.orderMsg = res.data
|
|
||||||
this.list1 = res.data.coreWorkOrderRespVOS
|
|
||||||
bomUseNum({
|
|
||||||
productId: this.orderMsg.planProductId
|
|
||||||
}).then(res2 => {
|
|
||||||
if (res2.data && res2.data.length > 0) {
|
|
||||||
let arr = res2.data
|
|
||||||
arr.map(item => {
|
|
||||||
if (item) {
|
|
||||||
let a = item.num * this.orderMsg.remainingQuantity
|
|
||||||
item.num = !isNaN(parseFloat(a)) && isFinite(a) ? a : ''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.list2 = arr
|
|
||||||
}else {
|
|
||||||
this.list2 = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 工艺
|
|
||||||
getProcessFlowList().then(res => {
|
|
||||||
let arr = res.data || []
|
|
||||||
if (arr.length > 0) {
|
|
||||||
arr.map(item => {
|
|
||||||
if (item.id === this.orderMsg.processFlowId) {
|
|
||||||
this.processFlowName = item.name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 返回
|
|
||||||
returnOrderManage() {
|
|
||||||
this.$router.go(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang='scss' scoped>
|
|
||||||
.orderDetailData {
|
|
||||||
background-color: rgb(242, 244, 249);
|
|
||||||
.box1, .box2, .box3 {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 9px;
|
|
||||||
}
|
|
||||||
.box2 {
|
|
||||||
height: calc((100vh - 360px) / 2);
|
|
||||||
padding: 12px 16px 0;
|
|
||||||
margin: 8px 0;
|
|
||||||
}
|
|
||||||
.box1 {
|
|
||||||
height: 215px;
|
|
||||||
padding: 16px 16px 0 16px;
|
|
||||||
.blodTip {
|
|
||||||
height: 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: rgba(0,0,0,0.85);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
.lightTip {
|
|
||||||
height: 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: rgba(102,102,102,0.75);
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.box3 {
|
|
||||||
padding: 16px;
|
|
||||||
height: calc((100vh - 360px) / 2);
|
|
||||||
}
|
|
||||||
.boxTitle {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000000;
|
|
||||||
margin:0 10px 20px 0;
|
|
||||||
}
|
|
||||||
.blueTitle {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 4px;
|
|
||||||
height: 18px;
|
|
||||||
background-color: #0B58FF;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-right: 8px;
|
|
||||||
vertical-align: bottom;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="boxTitle">
|
|
||||||
<span class="blueTitle"></span>
|
|
||||||
<span>各订单环形图</span>
|
|
||||||
</div>
|
|
||||||
<div class="chartBox" id='orderChartBox' v-show='chartList.length'>
|
|
||||||
<div class="chartItem" v-for="(item, index) in chartList" :key='index' :style="{width: 388*beilv+'px',height: 286*beilv+'px',padding:14*beilv+'px',marginRight:9*beilv+'px',marginBottom:9*beilv+'px'}">
|
|
||||||
<div class="topTitle" :style="{fontSize: 14 * beilv + 'px'}">
|
|
||||||
<svg-icon icon-class="order-monitoring" :style="{fontSize: 16*beilv+'px'}"/>
|
|
||||||
<span class="orderName" :style="{paddingRight:8*beilv+'px',marginRight:8*beilv+'px'}">{{item.orderName}}</span>
|
|
||||||
<span>订单计划数量{{item.num}}</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
:id="item.id"
|
|
||||||
:style="{width: 166*beilv+'px',height: 166*beilv+'px',margin: 'auto'}"
|
|
||||||
></div>
|
|
||||||
<div class="legend" :style="{height: 54 * beilv + 'px', marginTop: 10*beilv+'px'}">
|
|
||||||
<div class="legendItem" v-for="(subItem, i) in item.workOrder" :key='i' :style="{paddingRight:9*beilv+'px',marginRight:9*beilv+'px'}">
|
|
||||||
<span class="itemNum" :style="{fontSize: 18 * beilv + 'px'}">{{subItem.value}}</span>
|
|
||||||
<div>
|
|
||||||
<span class="itemName" :style="{fontSize: 14 * beilv + 'px'}">
|
|
||||||
<span class="smallBlock" :style="{backgroundColor:subItem.color,width:8*beilv+'px',height:8*beilv+'px'}"></span>
|
|
||||||
{{subItem.name}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 空图 -->
|
|
||||||
<div class="no-data-bg" v-show='!chartList.length'></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
import { debounce } from '@/utils/debounce'
|
|
||||||
export default {
|
|
||||||
name: 'MonitoringRingCharts',
|
|
||||||
props: {
|
|
||||||
chartList: {
|
|
||||||
type: Array,
|
|
||||||
default: () => {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
myChart: [],
|
|
||||||
beilv: 1,
|
|
||||||
canvasReset: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.beilv = document.getElementById('orderChartBox').offsetWidth / 1610
|
|
||||||
this.canvasReset = debounce(() => {
|
|
||||||
this.initChart()
|
|
||||||
}, 500)
|
|
||||||
window.addEventListener('resize', () => {
|
|
||||||
this.beilv = document.getElementById('orderChartBox').offsetWidth / 1610
|
|
||||||
this.canvasReset()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 饼图
|
|
||||||
initChart() {
|
|
||||||
if (this.chartList.length <= 0) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
// 销毁实例
|
|
||||||
for (let j = 0;j < this.chartList.length; j++) {
|
|
||||||
if (this.myChart[j]) {
|
|
||||||
this.myChart[j].dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (let i = 0; i < this.chartList.length; i++) {
|
|
||||||
var chartDom = document.getElementById(this.chartList[i].id);
|
|
||||||
this.myChart[i] = echarts.init(chartDom);
|
|
||||||
let colorList = []
|
|
||||||
this.chartList[i].workOrder.map(item => {
|
|
||||||
colorList.push(item.color)
|
|
||||||
})
|
|
||||||
let percentage = (this.chartList[i].sunNum/this.chartList[i].num*100).toFixed(0)
|
|
||||||
var option = {
|
|
||||||
color: colorList,
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: 'Access From',
|
|
||||||
type: 'pie',
|
|
||||||
radius: ['75%', '95%'],
|
|
||||||
avoidLabelOverlap: false,
|
|
||||||
itemStyle: {
|
|
||||||
borderRadius: 5,
|
|
||||||
borderColor: '#fff',
|
|
||||||
borderWidth: 2
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'center',
|
|
||||||
color: '#000',
|
|
||||||
formatter: [
|
|
||||||
'{a|'+percentage+'%}',
|
|
||||||
'{b|生产'+this.chartList[i].sunNum+'}'
|
|
||||||
].join('\n\n'),
|
|
||||||
rich: {
|
|
||||||
a: {
|
|
||||||
fontSize: this.beilv*24 +'px'
|
|
||||||
},
|
|
||||||
b: {
|
|
||||||
fontSize: this.beilv*12 +'px'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
disabled: true
|
|
||||||
},
|
|
||||||
labelLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
data: this.chartList[i].workOrder
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
option && this.myChart[i].setOption(option)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang='scss' scoped>
|
|
||||||
.chartBox {
|
|
||||||
width: 100%;
|
|
||||||
padding-right: 6px;
|
|
||||||
height: calc(100vh - 310px);
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
overflow: auto;
|
|
||||||
align-content: flex-start;
|
|
||||||
.chartItem {
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid #CACACA;
|
|
||||||
.topTitle {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
.orderName {
|
|
||||||
border-right: 1px solid #CACACA;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.legend {
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: auto;
|
|
||||||
.legendItem {
|
|
||||||
display: inline-block;
|
|
||||||
border-right: 1px solid #E8E8E8;
|
|
||||||
.itemName {
|
|
||||||
.smallBlock {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.legendItem:last-child {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,371 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container orderMonitoring">
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<search-bar
|
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<el-tabs v-model="activeName" @tab-click="toggleTab">
|
|
||||||
<el-tab-pane label="数据列表" name="dataList"></el-tab-pane>
|
|
||||||
<el-tab-pane label="环形图" name="barChart"></el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<!-- 表 -->
|
|
||||||
<div v-if="activeName === 'dataList'">
|
|
||||||
<base-table
|
|
||||||
:page="queryParams.pageNo"
|
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="140"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
|
||||||
<pagination
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getPage"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<!-- 图 -->
|
|
||||||
<monitoring-ring-charts ref='monitoringRingCharts' v-else :chart-list='chartList'/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
|
||||||
import { publicFormatter } from '@/utils/dict'
|
|
||||||
import { orderMonitor, orderAssignmentList } from '@/api/base/orderManage'
|
|
||||||
import MonitoringRingCharts from './../components/monitoringRingCharts'
|
|
||||||
import moment from "moment"
|
|
||||||
const tableProps = [
|
|
||||||
{
|
|
||||||
prop: 'name',
|
|
||||||
label: '订单名称'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'customerName',
|
|
||||||
label: '客户'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'productname',
|
|
||||||
label: '产品'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'planStartTime',
|
|
||||||
label: '计划开始时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'planFinishTime',
|
|
||||||
label: '计划完成时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'status',
|
|
||||||
label: '订单状态',
|
|
||||||
filter: publicFormatter('order_status')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'startProduceTime',
|
|
||||||
label: '实际开始时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'finishProduceTime',
|
|
||||||
label: '实际完成时间',
|
|
||||||
filter: parseTime,
|
|
||||||
minWidth: 160
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'lineNames',
|
|
||||||
label: '加工线',
|
|
||||||
filter: (val) => val ? val.join(',') : '',
|
|
||||||
minWidth: 180
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'planQuantity',
|
|
||||||
label: '计划生产量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'actualquantity',
|
|
||||||
label: '实际产出量',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'completeRate',
|
|
||||||
label: '订单完成率',
|
|
||||||
width: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'workOrderNum',
|
|
||||||
label: '关联工单数量',
|
|
||||||
width: 110
|
|
||||||
}
|
|
||||||
]
|
|
||||||
export default {
|
|
||||||
name: 'OrderCompletionMonitoring',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formConfig: [
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '订单名称',
|
|
||||||
param: 'name'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'datePicker',
|
|
||||||
label: '时间段',
|
|
||||||
dateType: 'daterange',
|
|
||||||
format: 'yyyy-MM-dd',
|
|
||||||
valueFormat: "yyyy-MM-dd",
|
|
||||||
rangeSeparator: '-',
|
|
||||||
startPlaceholder: '开始时间',
|
|
||||||
endPlaceholder: '结束时间',
|
|
||||||
param: 'timeVal',
|
|
||||||
defaultSelect: [],
|
|
||||||
width: 250
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
activeName: 'dataList',
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
name: null,
|
|
||||||
startProduceTime: []
|
|
||||||
},
|
|
||||||
tableProps,
|
|
||||||
list: [],
|
|
||||||
tableH: this.tableHeight(305),
|
|
||||||
total: 0,
|
|
||||||
tableBtn: [
|
|
||||||
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
|
||||||
? {
|
|
||||||
type: 'orderDetail',
|
|
||||||
btnName: '工单',
|
|
||||||
showTip: '工单详情',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'more',
|
|
||||||
name: 'workOrderNum',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-completion-monitoring:qualityDet')
|
|
||||||
? {
|
|
||||||
type: 'qualityDetail',
|
|
||||||
btnName: '质量',
|
|
||||||
showTip: '质量详情',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'more',
|
|
||||||
name: 'workOrderNum',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('base:order-completion-monitoring:sendOut')
|
|
||||||
? {
|
|
||||||
type: 'sendOutDetail',
|
|
||||||
btnName: '发货',
|
|
||||||
showTip: '发货详情',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
type: 'more',
|
|
||||||
name: 'workOrderNum',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined
|
|
||||||
].filter((v) => v),
|
|
||||||
chartList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: { MonitoringRingCharts },
|
|
||||||
mounted() {
|
|
||||||
window.addEventListener('resize', () => {
|
|
||||||
this.tableH = this.tableHeight(305)
|
|
||||||
})
|
|
||||||
let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
|
|
||||||
let end = moment().format('yyyy-MM-DD')
|
|
||||||
this.formConfig[1].defaultSelect = [start, end]
|
|
||||||
this.queryParams.startProduceTime[0] = start + ' 00:00:00'
|
|
||||||
this.queryParams.startProduceTime[1] = end + ' 23:59:59'
|
|
||||||
this.getPage()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getPage() {
|
|
||||||
// 表数据
|
|
||||||
orderMonitor({...this.queryParams}).then(res => {
|
|
||||||
this.list = res.data.records || []
|
|
||||||
this.total = res.data.total || 0
|
|
||||||
if (this.list.length > 0) {
|
|
||||||
let orderIdList = []
|
|
||||||
this.list.map(item => {
|
|
||||||
orderIdList.push(item.orderid)
|
|
||||||
})
|
|
||||||
// 图的数据
|
|
||||||
orderAssignmentList({orderIdList:orderIdList}).then(res => {
|
|
||||||
let color = ['#7164FF','#288AFF','#63BDFF','#8EF0AB','#FFCE6A']
|
|
||||||
let tempArr = res.data || {}
|
|
||||||
let tempArr2 = []
|
|
||||||
for (let key in tempArr) {
|
|
||||||
let tempArr3 = []
|
|
||||||
let obj = {}
|
|
||||||
obj.orderName = tempArr[key][0].orderName
|
|
||||||
obj.id = key
|
|
||||||
obj.num = tempArr[key][0].planQuantity
|
|
||||||
let sunNum = 0
|
|
||||||
for (let i = 0; i < tempArr[key].length; i++) {
|
|
||||||
let subObj = {}
|
|
||||||
subObj.value = tempArr[key][i].actualAssignmentQuantity
|
|
||||||
subObj.name = tempArr[key][i].woName
|
|
||||||
if (i < 5) {
|
|
||||||
subObj.color = color[i]
|
|
||||||
} else {
|
|
||||||
subObj.color = color[i%5]
|
|
||||||
}
|
|
||||||
sunNum+=tempArr[key][i].actualAssignmentQuantity
|
|
||||||
tempArr3.push(subObj)
|
|
||||||
}
|
|
||||||
tempArr3.push({
|
|
||||||
value: tempArr[key][0].planQuantity - sunNum > 0 ? tempArr[key][0].planQuantity - sunNum : 0,
|
|
||||||
name: '未下发',
|
|
||||||
color: '#F5F5F5'
|
|
||||||
})
|
|
||||||
obj.sunNum = sunNum
|
|
||||||
obj.workOrder = tempArr3
|
|
||||||
tempArr2.push(obj)
|
|
||||||
}
|
|
||||||
this.chartList = tempArr2
|
|
||||||
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.monitoringRingCharts.initChart()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
// 显示无数据的图片
|
|
||||||
this.chartList = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 查询
|
|
||||||
buttonClick(val) {
|
|
||||||
this.queryParams.name = val.name
|
|
||||||
if (val.timeVal && val.timeVal.length > 0) {
|
|
||||||
this.queryParams.startProduceTime[0] = val.timeVal[0] + ' 00:00:00'
|
|
||||||
this.queryParams.startProduceTime[1] = val.timeVal[1] + ' 23:59:59'
|
|
||||||
} else {
|
|
||||||
this.queryParams.startProduceTime = []
|
|
||||||
}
|
|
||||||
this.getPage()
|
|
||||||
},
|
|
||||||
handleClick(val) {
|
|
||||||
console.log(val)
|
|
||||||
switch (val.type) {
|
|
||||||
case 'orderDetail':
|
|
||||||
this.$router.push({
|
|
||||||
path: '/core/core-work-order-detail?woIdString='+val.data.woIdString
|
|
||||||
})
|
|
||||||
break
|
|
||||||
case 'qualityDetail':
|
|
||||||
this.$router.push({
|
|
||||||
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?woIdString='+val.data.woIdString
|
|
||||||
})
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
this.$router.push({
|
|
||||||
path: '/delivery/delivery-log?orderId='+encodeURI(val.data.name)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toggleTab() {
|
|
||||||
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.monitoringRingCharts.initChart()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang='scss'>
|
|
||||||
.orderMonitoring {
|
|
||||||
.el-tabs__nav::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 2px;
|
|
||||||
background-color: #e4e7ed;
|
|
||||||
}
|
|
||||||
.el-tabs__nav-wrap::after {
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
.el-tabs__item {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
.el-tabs__item:hover {
|
|
||||||
color: rgba(0, 0, 0, 0.85);
|
|
||||||
}
|
|
||||||
.el-tabs__item.is-active {
|
|
||||||
color: rgba(0, 0, 0, 0.85);
|
|
||||||
}
|
|
||||||
.el-tabs__item {
|
|
||||||
color: rgba(0, 0, 0, 0.45);
|
|
||||||
}
|
|
||||||
.searchBarBox {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.boxTitle {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000000;
|
|
||||||
margin:0 10px 16px 0;
|
|
||||||
}
|
|
||||||
.blueTitle {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 4px;
|
|
||||||
height: 18px;
|
|
||||||
background-color: #0B58FF;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-right: 8px;
|
|
||||||
vertical-align: bottom;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="工单模式">
|
<el-form-item label="工单模式">
|
||||||
<el-radio-group v-model="isBind">
|
<el-radio-group v-model="isBind" @input='toggleWay'>
|
||||||
<el-radio :label="true">绑定工单</el-radio>
|
<el-radio :label="true">绑定工单</el-radio>
|
||||||
<el-radio :label="false">新增工单</el-radio>
|
<el-radio :label="false">新增工单</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@@ -48,16 +48,19 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in productList"
|
v-for="item in productList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name + ' | ' + item.specifications"
|
:label="item.name"
|
||||||
:value="item.id">
|
:value="item.id"/>
|
||||||
<span style="float: left">{{ item.name }}</span>
|
|
||||||
<span style="float: right; color: #8492a6; font-size: 13px">
|
|
||||||
{{ item.specifications }}
|
|
||||||
</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="产品规格" prop="specifications">
|
||||||
|
<el-input
|
||||||
|
v-model="form.specifications"
|
||||||
|
placeholder="请输入产品规格"
|
||||||
|
disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -100,48 +103,6 @@
|
|||||||
style="width: 100%"></el-input-number>
|
style="width: 100%"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.processFlowId"
|
|
||||||
placeholder="请选择"
|
|
||||||
disabled
|
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="item in processFlowList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
|
||||||
<el-select
|
|
||||||
v-model="form.materialMethod"
|
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 100%"
|
|
||||||
disabled>
|
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="优先级" prop="priority">
|
|
||||||
<el-select
|
|
||||||
v-model="form.priority"
|
|
||||||
placeholder="请选择"
|
|
||||||
style="width: 100%"
|
|
||||||
:disabled="isBind">
|
|
||||||
<el-option
|
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -157,33 +118,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
|
||||||
<el-select
|
|
||||||
v-model="form.productLineId"
|
|
||||||
placeholder="请选择"
|
|
||||||
multiple
|
|
||||||
style="width: 100%"
|
|
||||||
:disabled="isBind">
|
|
||||||
<el-option
|
|
||||||
v-for="item in productLineList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="负责人" prop="workers">
|
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="负责部门" prop="deptId">
|
<el-form-item label="负责部门" prop="deptId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.deptId"
|
v-model="form.deptId"
|
||||||
placeholder="请选择关联产线"
|
placeholder="请选择关联产线"
|
||||||
style="width: 100%">
|
style="width: 100%"
|
||||||
|
:disabled="isBind">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deptList"
|
v-for="item in deptList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -192,23 +133,123 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
</el-row>
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
<el-row :gutter="20">
|
||||||
<el-input-number
|
<el-col :span="24">
|
||||||
v-model="form.planAssignmentQuantity"
|
<span class="add-type">物料计算方式</span>
|
||||||
:min="0"
|
<el-radio-group
|
||||||
:max="9999999999999"
|
v-model="form.materialMethod"
|
||||||
style="width: 100%"></el-input-number>
|
:disabled="isBind"
|
||||||
</el-form-item>
|
@change="materialMethodChange">
|
||||||
|
<el-radio :label="1">产品基础BOM</el-radio>
|
||||||
|
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div v-if="form.materialMethod === 1">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<span style="margin: 8px 0;" class="add-type">关联产线</span>
|
||||||
|
<el-button style="margin-left: 20px" type="text" @click="addBind" :disabled="isBind">
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row
|
||||||
|
:gutter="20"
|
||||||
|
v-for="(item, index) in form.productLineIds"
|
||||||
|
:key="index + 'line'"
|
||||||
|
style="margin-bottom: 8px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-select
|
||||||
|
v-model="item.lineId"
|
||||||
|
placeholder="请选择产线"
|
||||||
|
:disabled="isBind"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productLineList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="item.num"
|
||||||
|
placeholder="请输入数量"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:disabled="isBind"
|
||||||
|
step-strictly />
|
||||||
|
</el-tooltip>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<span style="margin: 8px 0; display: inline-block">
|
||||||
|
关联产线及工艺
|
||||||
|
</span>
|
||||||
|
<el-button style="margin-left: 20px" type="text" @click="addBind" :disabled="isBind">
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row
|
||||||
|
:gutter="20"
|
||||||
|
v-for="(item, index) in form.productLineIds"
|
||||||
|
:key="index + 'process'"
|
||||||
|
style="margin-bottom: 8px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-select
|
||||||
|
v-model="item.lineId"
|
||||||
|
placeholder="请选择产线"
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="isBind"
|
||||||
|
@change="processLineIdChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productLineList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-select
|
||||||
|
v-model="item.processId"
|
||||||
|
placeholder="请选择工艺"
|
||||||
|
filterable
|
||||||
|
:disabled="isBind"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in processFlowList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||||
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="item.num"
|
||||||
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
:disabled="isBind"
|
||||||
|
step-strictly />
|
||||||
|
</el-tooltip>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product';
|
import { getProductList } from '@/api/base/product';
|
||||||
import {
|
import {
|
||||||
getProcessFlowList,
|
getProcessFlowPage,
|
||||||
getWorkOrderCode,
|
|
||||||
orderIssue,
|
orderIssue,
|
||||||
workOrderList,
|
workOrderList,
|
||||||
getWorkOrderById,
|
getWorkOrderById,
|
||||||
@@ -216,13 +257,13 @@ import {
|
|||||||
import { getLineAll } from '@/api/base/productionLine';
|
import { getLineAll } from '@/api/base/productionLine';
|
||||||
import { listDept } from '@/api/system/dept';
|
import { listDept } from '@/api/system/dept';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import { getCode } from '@/api/base/coreWorkOrder';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddWorkOrder',
|
name: 'AddWorkOrder',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
workOrderId: '',
|
workOrderId: '',
|
||||||
orderId: '',
|
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
planProductId: '',
|
planProductId: '',
|
||||||
@@ -231,12 +272,9 @@ export default {
|
|||||||
planAssignQuantity: 0,
|
planAssignQuantity: 0,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
planQuantity: 0,
|
planQuantity: 0,
|
||||||
processFlowId: '',
|
|
||||||
materialMethod: 1,
|
materialMethod: 1,
|
||||||
priority: '',
|
productLineIds: [{ lineId: null, processId: null, num: null }],
|
||||||
productLineId: [],
|
|
||||||
type: '',
|
type: '',
|
||||||
workers: '',
|
|
||||||
planAssignmentQuantity: '',
|
planAssignmentQuantity: '',
|
||||||
},
|
},
|
||||||
deptList: [],
|
deptList: [],
|
||||||
@@ -244,6 +282,9 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{ required: true, message: '工单名称不能为空', trigger: 'blur' },
|
{ required: true, message: '工单名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
|
workOrderId:[
|
||||||
|
{ required: true, message: '工单名称不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
planProductId: [
|
planProductId: [
|
||||||
{ required: true, message: '产品名称不能为空', trigger: 'change' },
|
{ required: true, message: '产品名称不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
@@ -253,9 +294,6 @@ export default {
|
|||||||
planQuantity: [
|
planQuantity: [
|
||||||
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' },
|
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
productLineId: [
|
|
||||||
{ required: true, message: '产线不能为空', trigger: 'change' },
|
|
||||||
],
|
|
||||||
planAssignmentQuantity: [
|
planAssignmentQuantity: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -263,63 +301,81 @@ export default {
|
|||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
deptId:[
|
||||||
|
{ required: true, message: '负责部门不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
productLineList: [],
|
productLineList: [],
|
||||||
workOrderTypeList: [
|
workOrderTypeList: [
|
||||||
{ id: 1, name: '标准工单' },
|
{ id: 1, name: '普通' },
|
||||||
{ id: 2, name: '特殊工单' },
|
{ id: 2, name: '特殊' },
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
isBind: false,
|
isBind: true,
|
||||||
workOrderList: [],
|
workOrderList: [],
|
||||||
orderData: {},
|
orderData: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 工艺变更
|
||||||
|
materialMethodChange(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.processFlowList = [];
|
||||||
|
this.form.productLineIds = [];
|
||||||
|
const obj = { lineId: null, processId: null, num: null };
|
||||||
|
this.form.productLineIds.push(obj);
|
||||||
|
},
|
||||||
|
// 产线工艺关联
|
||||||
|
processLineIdChange(val) {
|
||||||
|
const params = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
lineId: val,
|
||||||
|
};
|
||||||
|
// 工艺
|
||||||
|
getProcessFlowPage(params).then((res) => {
|
||||||
|
this.processFlowList = res.data.list || [];
|
||||||
|
console.log(this.processFlowList);
|
||||||
|
});
|
||||||
|
},
|
||||||
init(data, param) {
|
init(data, param) {
|
||||||
this.isBind = true;
|
this.isBind = true;
|
||||||
this.orderData = data;
|
this.orderData = data;
|
||||||
this.form.orderId = data.id;
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
changeAdd() {
|
toggleWay(val) {
|
||||||
if (this.isBind) {
|
console.log(val);
|
||||||
this.isBind = false;
|
this.formClear()
|
||||||
getWorkOrderCode().then((res) => {
|
if (!val) {
|
||||||
this.form.code = res.data || '';
|
// 获取工单编码
|
||||||
});
|
getCode().then((res) => {
|
||||||
this.form.orderId = null;
|
this.form.code = res.data;
|
||||||
this.form.planProductId = this.orderData.planProductId;
|
this.form.planProductId = this.orderData.planProductId;
|
||||||
this.form.processFlowId = this.orderData.processFlowId;
|
this.form.name = '';
|
||||||
this.form.materialMethod = this.orderData.materialMethod;
|
this.selectProduct(this.form.planProductId)
|
||||||
} else {
|
})
|
||||||
this.isBind = true;
|
}else{
|
||||||
this.form.orderId = this.orderData.id;
|
this.form.code = '';
|
||||||
this.form.planProductId = null;
|
this.form.planProductId = '';
|
||||||
this.form.processFlowId = null;
|
|
||||||
this.form.materialMethod = null;
|
|
||||||
this.form.code = null;
|
|
||||||
}
|
}
|
||||||
|
this.form.materialMethod = 1;
|
||||||
|
this.form.productLineIds = [];
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
listDept().then((res) => {
|
listDept().then((res) => {
|
||||||
this.deptList = res.data || [];
|
this.deptList = res.data || [];
|
||||||
});
|
});
|
||||||
// 产品
|
// 产品
|
||||||
getProductAll().then((res) => {
|
getProductList().then((res) => {
|
||||||
this.productList = res.data || [];
|
this.productList = res.data || [];
|
||||||
});
|
});
|
||||||
// 产线
|
// 产线
|
||||||
getLineAll().then((res) => {
|
getLineAll().then((res) => {
|
||||||
this.productLineList = res.data || [];
|
this.productLineList = res.data || [];
|
||||||
});
|
});
|
||||||
// 工艺
|
|
||||||
getProcessFlowList().then((res) => {
|
|
||||||
this.processFlowList = res.data || [];
|
|
||||||
});
|
|
||||||
// 工单list
|
// 工单list
|
||||||
workOrderList({
|
workOrderList({
|
||||||
status: 1,
|
status: 1,
|
||||||
@@ -327,6 +383,18 @@ export default {
|
|||||||
this.workOrderList = res.data || [];
|
this.workOrderList = res.data || [];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 选产品带出规格
|
||||||
|
selectProduct(val) {
|
||||||
|
if (val) {
|
||||||
|
this.productList.map((item) => {
|
||||||
|
if (val === item.id) {
|
||||||
|
this.form.specifications = item.specifications;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.form.specifications = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
addWorkOrderSubmit() {
|
addWorkOrderSubmit() {
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -334,8 +402,7 @@ export default {
|
|||||||
//绑定工单
|
//绑定工单
|
||||||
orderIssue({
|
orderIssue({
|
||||||
workOrderId: this.form.workOrderId,
|
workOrderId: this.form.workOrderId,
|
||||||
orderId: this.form.orderId,
|
orderId: this.orderData.id,
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity,
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
@@ -344,24 +411,19 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 新增工单
|
// 新增工单
|
||||||
let _this = this;
|
this.form.planStartTime = this.planStartTime
|
||||||
_this.form.planStartTime = _this.planStartTime
|
? new Date(this.planStartTime).valueOf()
|
||||||
? new Date(_this.planStartTime).valueOf()
|
|
||||||
: '';
|
: '';
|
||||||
_this.form.planFinishTime = _this.planFinishTime
|
this.form.planFinishTime = this.planFinishTime
|
||||||
? new Date(_this.planFinishTime).valueOf()
|
? new Date(this.planFinishTime).valueOf()
|
||||||
: '';
|
: '';
|
||||||
orderIssue({ ..._this.form }).then((res) => {
|
orderIssue({
|
||||||
|
...this.form,
|
||||||
|
orderId: this.orderData.id,
|
||||||
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
_this.$modal.msgSuccess('操作成功');
|
this.$modal.msgSuccess('操作成功');
|
||||||
let name = this.form.name;
|
this.$emit('addWorkOrderSubmit');
|
||||||
_this.$emit('addWorkOrderSubmit');
|
|
||||||
// 询问是否添加预使用主原料
|
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
|
||||||
// _this.$router.push({
|
|
||||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -379,39 +441,49 @@ export default {
|
|||||||
this.planStartTime = '';
|
this.planStartTime = '';
|
||||||
this.form.planFinishTime = '';
|
this.form.planFinishTime = '';
|
||||||
this.form.planStartTime = '';
|
this.form.planStartTime = '';
|
||||||
this.isBind = false;
|
|
||||||
},
|
},
|
||||||
// 绑定工单,选择工单时获取工单信息
|
// 绑定工单,选择工单时获取工单信息
|
||||||
getWorkOrderMsg() {
|
getWorkOrderMsg() {
|
||||||
if (this.form.workOrderId) {
|
if (this.form.workOrderId) {
|
||||||
getWorkOrderById({ id: this.form.workOrderId }).then((res) => {
|
getWorkOrderById({ id: this.form.workOrderId }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.code = res.data.code;
|
this.form = res.data;
|
||||||
this.form.planProductId = res.data.planProductId;
|
this.form.workOrderId = res.data.id;
|
||||||
this.planStartTime = res.data.planStartTime
|
this.planStartTime = res.data.planStartTime
|
||||||
? moment
|
? moment(res.data.planStartTime)
|
||||||
.unix(res.data.planStartTime)
|
|
||||||
.format('YYYY-MM-DD HH:mm:ss')
|
.format('YYYY-MM-DD HH:mm:ss')
|
||||||
: null;
|
: null;
|
||||||
this.planFinishTime = res.data.planFinishTime
|
this.planFinishTime = res.data.planFinishTime
|
||||||
? moment
|
? moment(res.data.planFinishTime)
|
||||||
.unix(res.data.planFinishTime)
|
|
||||||
.format('YYYY-MM-DD HH:mm:ss')
|
.format('YYYY-MM-DD HH:mm:ss')
|
||||||
: null;
|
: null;
|
||||||
this.form.planAssignQuantity = res.data.planAssignQuantity;
|
// 根据产线获取工艺
|
||||||
this.form.planQuantity = res.data.planQuantity;
|
if (this.form.materialMethod === 2) {
|
||||||
this.form.processFlowId = res.data.processFlowId;
|
this.form.productLineIds.forEach((item) => {
|
||||||
this.form.materialMethod = res.data.materialMethod;
|
if (item.lineId) {
|
||||||
this.form.priority = res.data.priority
|
this.processLineIdChange(item.lineId);
|
||||||
? res.data.priority + ''
|
}
|
||||||
: '';
|
})
|
||||||
this.form.productLineId = res.data.productLineIds;
|
}
|
||||||
this.form.type = res.data.type;
|
|
||||||
this.form.workers = res.data.workers;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
addBind() {
|
||||||
|
const obj = { lineId: null, processId: null, num: null };
|
||||||
|
this.form.productLineIds.push(obj);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.add-type {
|
||||||
|
margin: 0 20px 15px 0;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.add-type::before {
|
||||||
|
content: '*';
|
||||||
|
color: #ff4949;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
|
<el-select @change="getSpec" v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
|
<el-option v-for="item in productList" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select @change="getSpec" v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
<el-select @change="getSpec" v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option v-for="item in productList" :key="item.id" :label="item.name+' | '+(item.specifications || '')"
|
<el-option v-for="item in productList" :key="item.id" :label="item.name+' | '+(item.specifications || '')"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
@@ -26,7 +32,7 @@
|
|||||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@@ -50,16 +56,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="单价" prop="price">
|
|
||||||
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;">
|
|
||||||
</el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="包装规格" prop="packSpec">
|
<el-form-item label="包装规格" prop="packSpec">
|
||||||
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
|
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
|
||||||
@@ -69,7 +65,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span='24'>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark"></el-input>
|
<el-input v-model="form.remark"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -79,7 +77,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getOrderCode, getOrderById, getProcessFlowList, orderUpdate, orderCreate } from '@/api/base/orderManage'
|
import { getOrderCode, getOrderById, getProcessFlowList, orderUpdate, orderCreate } from '@/api/base/orderManage'
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductList } from '@/api/base/product'
|
||||||
import { getCustomerList } from '@/api/base/customer'
|
import { getCustomerList } from '@/api/base/customer'
|
||||||
export default {
|
export default {
|
||||||
name: 'OrderAdd',
|
name: 'OrderAdd',
|
||||||
@@ -93,9 +91,7 @@ export default {
|
|||||||
planQuantity: '',
|
planQuantity: '',
|
||||||
planProductId: '',
|
planProductId: '',
|
||||||
specifications:undefined,
|
specifications:undefined,
|
||||||
price: '',
|
|
||||||
customerId: '',
|
customerId: '',
|
||||||
priority: '',
|
|
||||||
packSpec: '',
|
packSpec: '',
|
||||||
workers: '',
|
workers: '',
|
||||||
materialMethod: 1,
|
materialMethod: 1,
|
||||||
@@ -108,7 +104,8 @@ export default {
|
|||||||
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
|
||||||
code: [{ required: true, message: "订单号不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "订单号不能为空", trigger: "blur" }],
|
||||||
planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
|
planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
|
||||||
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }]
|
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
|
||||||
|
deliveTime: [{ required: true, message: "交货日期不能为空", trigger: "change" }]
|
||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
customerList: [],
|
customerList: [],
|
||||||
@@ -136,9 +133,7 @@ export default {
|
|||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.planQuantity = res.data.planQuantity
|
this.form.planQuantity = res.data.planQuantity
|
||||||
this.form.planProductId = res.data.planProductId
|
this.form.planProductId = res.data.planProductId
|
||||||
this.form.price = res.data.price
|
|
||||||
this.form.customerId = res.data.customerId
|
this.form.customerId = res.data.customerId
|
||||||
this.form.priority = res.data.priority ? res.data.priority + '' : ''
|
|
||||||
this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
|
this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
|
||||||
this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
|
this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
|
||||||
this.form.workers = res.data.workers
|
this.form.workers = res.data.workers
|
||||||
@@ -160,7 +155,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 产品
|
// 产品
|
||||||
getProductAll().then(res => {
|
getProductList().then(res => {
|
||||||
this.productList = res.data || []
|
this.productList = res.data || []
|
||||||
})
|
})
|
||||||
// 客户
|
// 客户
|
||||||
@@ -229,7 +224,6 @@ export default {
|
|||||||
formClear() {
|
formClear() {
|
||||||
this.$refs.orderAddForm.resetFields()
|
this.$refs.orderAddForm.resetFields()
|
||||||
this.form.materialMethod = 1
|
this.form.materialMethod = 1
|
||||||
this.form.price = 0.00
|
|
||||||
this.form.planQuantity = 0
|
this.form.planQuantity = 0
|
||||||
this.isEdit = false
|
this.isEdit = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2024-09-26 14:08:58
|
* @Date: 2024-09-26 14:08:58
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-11-06 09:52:59
|
* @LastEditTime: 2024-11-13 15:23:25
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -69,15 +69,10 @@ const tableProps = [
|
|||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'specifications',
|
prop: 'productSpec',
|
||||||
label: '产品规格',
|
label: '产品规格',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// prop: 'priority',
|
|
||||||
// label: '优先级',
|
|
||||||
// filter: publicFormatter('order_priority')
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
prop: 'planQuantity',
|
prop: 'planQuantity',
|
||||||
label: '计划加工量',
|
label: '计划加工量',
|
||||||
@@ -92,17 +87,11 @@ const tableProps = [
|
|||||||
subcomponent: selectTime,
|
subcomponent: selectTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'customerId',
|
prop: 'customerName',
|
||||||
label: '客户',
|
label: '客户',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
// subcomponent: selectMember,
|
// subcomponent: selectMember,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'price',
|
|
||||||
label: '单价',
|
|
||||||
width: 100,
|
|
||||||
// subcomponent: inputArea,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'packSpec',
|
prop: 'packSpec',
|
||||||
label: '包装规格',
|
label: '包装规格',
|
||||||
@@ -130,10 +119,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
planQuantity: '',
|
planQuantity: '',
|
||||||
planProductId: '',
|
planProductId: '',
|
||||||
price: '',
|
|
||||||
customerId: '',
|
customerId: '',
|
||||||
attr3: undefined,
|
attr3: undefined,
|
||||||
priority: '',
|
|
||||||
packSpec: '',
|
packSpec: '',
|
||||||
workers: '',
|
workers: '',
|
||||||
materialMethod: 1,
|
materialMethod: 1,
|
||||||
@@ -190,9 +177,7 @@ export default {
|
|||||||
// this.form.code = res.data.code
|
// this.form.code = res.data.code
|
||||||
// this.form.planQuantity = res.data.planQuantity
|
// this.form.planQuantity = res.data.planQuantity
|
||||||
// this.form.planProductId = res.data.planProductId
|
// this.form.planProductId = res.data.planProductId
|
||||||
// this.form.price = res.data.price
|
|
||||||
// this.form.customerId = res.data.customerId
|
// this.form.customerId = res.data.customerId
|
||||||
// this.form.priority = res.data.priority ? res.data.priority + '' : ''
|
|
||||||
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
|
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
|
||||||
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
|
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
|
||||||
// this.form.workers = res.data.workers
|
// this.form.workers = res.data.workers
|
||||||
|
|||||||
@@ -62,14 +62,14 @@
|
|||||||
label="产品"
|
label="产品"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="120" />
|
min-width="120" />
|
||||||
<el-table-column prop="deliveTime" label="交货时间" width="160">
|
<el-table-column prop="deliveTime" label="交货日期" width="160">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.deliveTime) }}</span>
|
<span>{{ parseTime(scope.row.deliveTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="workOrderNum" label="工单数量" width="140">
|
<el-table-column prop="workOrderNum" label="工单数量" width="140">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button @click="handleRoute" type="text">
|
<el-button @click="handleRoute(scope.row)" type="text" style='padding: 0px;'>
|
||||||
{{ scope.row.workOrderNum }}
|
{{ scope.row.workOrderNum }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -78,6 +78,7 @@
|
|||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
:disabled="!(scope.row.status != 5 && scope.row.workOrderNum === 0)"
|
:disabled="!(scope.row.status != 5 && scope.row.workOrderNum === 0)"
|
||||||
@click="handleClick({ data: scope.row, type: 'split' })"
|
@click="handleClick({ data: scope.row, type: 'split' })"
|
||||||
v-hasPermi="['base:order-manage:split']">
|
v-hasPermi="['base:order-manage:split']">
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
:disabled="
|
:disabled="
|
||||||
!(
|
!(
|
||||||
scope.row.status === 1 ||
|
scope.row.status === 1 ||
|
||||||
@@ -95,12 +97,22 @@
|
|||||||
"
|
"
|
||||||
@click="handleClick({ data: scope.row, type: 'bind' })"
|
@click="handleClick({ data: scope.row, type: 'bind' })"
|
||||||
v-hasPermi="['base:order-manage:bindWorkOrder']">
|
v-hasPermi="['base:order-manage:bindWorkOrder']">
|
||||||
绑定工单
|
下发工单
|
||||||
|
</el-button>
|
||||||
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
|
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
|
||||||
|
@click="handleClick({ data: scope.row, type: 'stop' })"
|
||||||
|
v-hasPermi="['base:order-manage:stop']">
|
||||||
|
终止
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- addWorkOrder -->
|
<!-- addWorkOrder -->
|
||||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
|
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
|
||||||
@click="handleClick({ data: scope.row, type: 'complete' })"
|
@click="handleClick({ data: scope.row, type: 'complete' })"
|
||||||
v-hasPermi="['base:order-manage:bindWorkOrder']">
|
v-hasPermi="['base:order-manage:bindWorkOrder']">
|
||||||
@@ -109,6 +121,7 @@
|
|||||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
@click="handleClick({ data: scope.row, type: 'detail' })"
|
@click="handleClick({ data: scope.row, type: 'detail' })"
|
||||||
v-hasPermi="['base:order-manage:detail']">
|
v-hasPermi="['base:order-manage:detail']">
|
||||||
<span class="iconfont icon-detail primary-color" />
|
<span class="iconfont icon-detail primary-color" />
|
||||||
@@ -116,15 +129,16 @@
|
|||||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
:disabled="
|
:disabled="
|
||||||
!(scope.row.status === 1 && scope.row.triggerOrigin === 1)
|
!(scope.row.status === 1)
|
||||||
"
|
"
|
||||||
@click="handleClick({ data: scope.row, type: 'edit' })"
|
@click="handleClick({ data: scope.row, type: 'edit' })"
|
||||||
v-hasPermi="['base:order-manage:edit']">
|
v-hasPermi="['base:order-manage:edit']">
|
||||||
<span
|
<span
|
||||||
class="iconfont icon-edit"
|
class="iconfont icon-edit"
|
||||||
:class="
|
:class="
|
||||||
!(scope.row.status === 1 && scope.row.triggerOrigin === 1)
|
!(scope.row.status === 1)
|
||||||
? ''
|
? ''
|
||||||
: 'primary-color'
|
: 'primary-color'
|
||||||
" />
|
" />
|
||||||
@@ -132,18 +146,12 @@
|
|||||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
|
style='padding: 0px;'
|
||||||
:disabled="scope.row.status != 1"
|
:disabled="scope.row.status != 1"
|
||||||
@click="handleClick({ data: scope.row, type: 'void' })"
|
@click="handleClick({ data: scope.row, type: 'void' })"
|
||||||
v-hasPermi="['base:order-manage:delete']">
|
v-hasPermi="['base:order-manage:delete']">
|
||||||
作废
|
作废
|
||||||
</el-button>
|
</el-button>
|
||||||
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
@click="handleClick({ data: scope.row, type: 'stop' })"
|
|
||||||
v-hasPermi="['base:order-manage:stop']">
|
|
||||||
终止
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -193,7 +201,6 @@
|
|||||||
import { parseTime } from '@/utils/ruoyi';
|
import { parseTime } from '@/utils/ruoyi';
|
||||||
import {
|
import {
|
||||||
getOrderPage,
|
getOrderPage,
|
||||||
orderDelete,
|
|
||||||
orderAssignmentList,
|
orderAssignmentList,
|
||||||
orderFinish,
|
orderFinish,
|
||||||
orderVoid,
|
orderVoid,
|
||||||
@@ -380,7 +387,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
console.log(val);
|
|
||||||
switch (val.type) {
|
switch (val.type) {
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.addOrEditTitle = '编辑';
|
this.addOrEditTitle = '编辑';
|
||||||
@@ -389,21 +395,11 @@ export default {
|
|||||||
this.$refs.orderAdd.init(val.data.id);
|
this.$refs.orderAdd.init(val.data.id);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
|
||||||
this.handleDelete(val.data);
|
|
||||||
break;
|
|
||||||
case 'detail':
|
case 'detail':
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: 'order-detail-data?orderId=' + val.data.id,
|
path: 'order-detail-data?orderId=' + val.data.id,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'add':
|
|
||||||
this.workIssueTitle = '新增工单';
|
|
||||||
this.addWorkOrdervisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.addWorkOrder.init(val.data, 'add');
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'void':
|
case 'void':
|
||||||
orderVoid({ id: val.data.id }).then((res) => {
|
orderVoid({ id: val.data.id }).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -437,19 +433,6 @@ export default {
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
|
||||||
handleDelete(val) {
|
|
||||||
this.$modal
|
|
||||||
.confirm('是否确认删除"' + val.name + '"的数据项?')
|
|
||||||
.then(function () {
|
|
||||||
return orderDelete({ id: val.id });
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess('操作成功');
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
// 完成
|
// 完成
|
||||||
handleComplete(val) {
|
handleComplete(val) {
|
||||||
this.$modal
|
this.$modal
|
||||||
@@ -499,13 +482,13 @@ export default {
|
|||||||
this.splitWorkOrderCancel();
|
this.splitWorkOrderCancel();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
async handleRoute() {
|
async handleRoute(row) {
|
||||||
const res = await orderAssignmentList({
|
const res = await orderAssignmentList({
|
||||||
orderIdList: [this.injectData.id],
|
orderIdList: [row.id],
|
||||||
});
|
});
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
let arr = [];
|
let arr = [];
|
||||||
res.data[this.injectData.id].forEach((ele) => {
|
res.data[row.id].forEach((ele) => {
|
||||||
arr.push(ele.workOrderId);
|
arr.push(ele.workOrderId);
|
||||||
});
|
});
|
||||||
let woIdString = arr.join(',');
|
let woIdString = arr.join(',');
|
||||||
@@ -571,3 +554,9 @@ export default {
|
|||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.orderTable .el-table__cell {
|
||||||
|
padding: 0 !important;
|
||||||
|
height: 35px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
size="small"
|
size="small"
|
||||||
style="float: right; margin-top: -10px"
|
style="float: right; margin-top: -25px"
|
||||||
@click="returnOrderManage">
|
@click="returnOrderManage">
|
||||||
<svg-icon icon-class="return" />
|
<svg-icon icon-class="return" />
|
||||||
返回
|
返回
|
||||||
@@ -116,10 +116,6 @@
|
|||||||
<div class="blodTip">备注</div>
|
<div class="blodTip">备注</div>
|
||||||
<div class="lightTip">{{ orderMsg.remark }}</div>
|
<div class="lightTip">{{ orderMsg.remark }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="3">
|
|
||||||
<div class="blodTip">负责人</div>
|
|
||||||
<div class="lightTip">{{ orderMsg.workers }}</div>
|
|
||||||
</el-col> -->
|
|
||||||
<!-- <el-col :span='3'>
|
<!-- <el-col :span='3'>
|
||||||
<div class="blodTip">关联工艺</div>
|
<div class="blodTip">关联工艺</div>
|
||||||
<div class="lightTip">{{processFlowName}}</div>
|
<div class="lightTip">{{processFlowName}}</div>
|
||||||
@@ -249,10 +245,6 @@ const tableProps1 = [
|
|||||||
filter: (val) => (val ? val.join(',') : ''),
|
filter: (val) => (val ? val.join(',') : ''),
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'workers',
|
|
||||||
label: '负责人',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
label: '备注',
|
label: '备注',
|
||||||
@@ -421,6 +413,19 @@ export default {
|
|||||||
.box1 {
|
.box1 {
|
||||||
height: 215px;
|
height: 215px;
|
||||||
padding: 16px 16px 0 16px;
|
padding: 16px 16px 0 16px;
|
||||||
|
.boxTitle {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.blueTitle {
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top:4px;
|
||||||
|
}
|
||||||
.blodTip {
|
.blodTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
this.chartList[i].workOrder.map(item => {
|
this.chartList[i].workOrder.map(item => {
|
||||||
colorList.push(item.color)
|
colorList.push(item.color)
|
||||||
})
|
})
|
||||||
let percentage = (this.chartList[i].sunNum/this.chartList[i].num*100).toFixed(0)
|
let percentage = (this.chartList[i].sunNum/this.chartList[i].num*100).toFixed(2)
|
||||||
var option = {
|
var option = {
|
||||||
color: colorList,
|
color: colorList,
|
||||||
series: [
|
series: [
|
||||||
|
|||||||
@@ -249,14 +249,14 @@ export default {
|
|||||||
let sunNum = 0
|
let sunNum = 0
|
||||||
for (let i = 0; i < tempArr[key].length; i++) {
|
for (let i = 0; i < tempArr[key].length; i++) {
|
||||||
let subObj = {}
|
let subObj = {}
|
||||||
subObj.value = tempArr[key][i].actualAssignmentQuantity
|
subObj.value = tempArr[key][i].actualAssignmentQuantity || 0
|
||||||
subObj.name = tempArr[key][i].woName
|
subObj.name = tempArr[key][i].woName
|
||||||
if (i < 5) {
|
if (i < 5) {
|
||||||
subObj.color = color[i]
|
subObj.color = color[i]
|
||||||
} else {
|
} else {
|
||||||
subObj.color = color[i%5]
|
subObj.color = color[i%5]
|
||||||
}
|
}
|
||||||
sunNum+=tempArr[key][i].actualAssignmentQuantity
|
sunNum+=(tempArr[key][i].actualAssignmentQuantity || 0)
|
||||||
tempArr3.push(subObj)
|
tempArr3.push(subObj)
|
||||||
}
|
}
|
||||||
tempArr3.push({
|
tempArr3.push({
|
||||||
@@ -268,6 +268,7 @@ export default {
|
|||||||
obj.workOrder = tempArr3
|
obj.workOrder = tempArr3
|
||||||
tempArr2.push(obj)
|
tempArr2.push(obj)
|
||||||
}
|
}
|
||||||
|
console.log(tempArr2)
|
||||||
this.chartList = tempArr2
|
this.chartList = tempArr2
|
||||||
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
if (this.activeName === 'barChart' && this.chartList.length > 0) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
|||||||
$mgr: 8px;
|
$mgr: 8px;
|
||||||
@each $size, $height in $pxls {
|
@each $size, $height in $pxls {
|
||||||
.#{$size}-title {
|
.#{$size}-title {
|
||||||
font-size: 18px;
|
font-size: $height;
|
||||||
line-height: $height;
|
line-height: $height;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
<el-form-item label="产品规格" prop="specifications">
|
<el-form-item label="产品规格" prop="specifications">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.specifications"
|
v-model="dataForm.specifications"
|
||||||
placeholder="请输入产品规格" />
|
placeholder="请输入产品规格"
|
||||||
|
disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -132,13 +133,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="负责人" prop="workers">
|
|
||||||
<el-input
|
|
||||||
v-model="dataForm.workers"
|
|
||||||
placeholder="请输入负责人"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -149,11 +143,6 @@
|
|||||||
<el-radio :label="1">产品基础BOM</el-radio>
|
<el-radio :label="1">产品基础BOM</el-radio>
|
||||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- <el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;"
|
|
||||||
@change="materialMethodChange">
|
|
||||||
<el-option key="1" label="产品基础BOM" :value="1" />
|
|
||||||
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
|
||||||
</el-select> -->
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-if="dataForm.materialMethod === 1">
|
<div v-if="dataForm.materialMethod === 1">
|
||||||
@@ -183,6 +172,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="item.num"
|
v-model="item.num"
|
||||||
@@ -190,6 +180,7 @@
|
|||||||
:step="1"
|
:step="1"
|
||||||
:min="0"
|
:min="0"
|
||||||
step-strictly />
|
step-strictly />
|
||||||
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@@ -236,26 +227,21 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
<el-tooltip effect="dark" content="该产线分配生产数量" placement="top-end">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="item.num"
|
v-model="item.num"
|
||||||
:step="1"
|
:step="1"
|
||||||
:min="0"
|
:min="0"
|
||||||
step-strictly />
|
step-strictly />
|
||||||
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-row>
|
|
||||||
<el-col :span='12'>
|
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product';
|
import { getProductList } from '@/api/base/product';
|
||||||
import { getProcessFlowPage, workOrderList } from '@/api/base/orderManage';
|
import { getProcessFlowPage, workOrderList } from '@/api/base/orderManage';
|
||||||
import {
|
import {
|
||||||
createCoreWO,
|
createCoreWO,
|
||||||
@@ -295,7 +281,6 @@ export default {
|
|||||||
priority: '',
|
priority: '',
|
||||||
productLineIds: [{ lineId: null, processId: null, num: null }],
|
productLineIds: [{ lineId: null, processId: null, num: null }],
|
||||||
type: '',
|
type: '',
|
||||||
workers: '',
|
|
||||||
status: 1,
|
status: 1,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
@@ -323,9 +308,6 @@ export default {
|
|||||||
{ id: 1, name: '普通' },
|
{ id: 1, name: '普通' },
|
||||||
{ id: 2, name: '特殊' },
|
{ id: 2, name: '特殊' },
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
|
||||||
planFinishTime: '',
|
|
||||||
isBind: false,
|
|
||||||
workOrderList: [],
|
workOrderList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -340,10 +322,6 @@ export default {
|
|||||||
this.dataForm.productLineIds = [];
|
this.dataForm.productLineIds = [];
|
||||||
const obj = { lineId: null, processId: null, num: null };
|
const obj = { lineId: null, processId: null, num: null };
|
||||||
this.dataForm.productLineIds.push(obj);
|
this.dataForm.productLineIds.push(obj);
|
||||||
// if (val === 2 && !this.dataForm.processFlowId) {
|
|
||||||
// this.dataForm.materialMethod = 1;
|
|
||||||
// this.$modal.msgError('请先选择关联工艺');
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
// 产线工艺关联
|
// 产线工艺关联
|
||||||
processLineIdChange(val) {
|
processLineIdChange(val) {
|
||||||
@@ -355,6 +333,7 @@ export default {
|
|||||||
// 工艺
|
// 工艺
|
||||||
getProcessFlowPage(params).then((res) => {
|
getProcessFlowPage(params).then((res) => {
|
||||||
this.processFlowList = res.data.list || [];
|
this.processFlowList = res.data.list || [];
|
||||||
|
console.log(this.processFlowList);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
@@ -365,15 +344,26 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
this.planStartTime = '';
|
this.dataForm.planStartTime = '';
|
||||||
this.planFinishTime = '';
|
this.dataForm.planFinishTime = '';
|
||||||
|
this.dataForm.productLineIds = [{ lineId: null, processId: null, num: null }];
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
getCoreWO(id).then((response) => {
|
getCoreWO(id).then((response) => {
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data;
|
||||||
|
this.dataForm.planStartTime = response.data.planStartTime ? response.data.planStartTime : '';
|
||||||
|
this.dataForm.planFinishTime = response.data.planFinishTime ? response.data.planFinishTime : '';
|
||||||
if (this.dataForm.priority !== undefined) {
|
if (this.dataForm.priority !== undefined) {
|
||||||
this.dataForm.priority = String(this.dataForm.priority);
|
this.dataForm.priority = String(this.dataForm.priority);
|
||||||
}
|
}
|
||||||
this.dataForm.priority;
|
this.dataForm.priority;
|
||||||
|
// 根据产线获取工艺
|
||||||
|
if (this.dataForm.materialMethod === 2) {
|
||||||
|
this.dataForm.productLineIds.forEach((item) => {
|
||||||
|
if (item.lineId) {
|
||||||
|
this.processLineIdChange(item.lineId);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.urlOptions.isGetCode) {
|
if (this.urlOptions.isGetCode) {
|
||||||
@@ -418,21 +408,7 @@ export default {
|
|||||||
this.urlOptions.createURL(this.dataForm).then((response) => {
|
this.urlOptions.createURL(this.dataForm).then((response) => {
|
||||||
this.$modal.msgSuccess('新增成功');
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$confirm('是否添加预使用主原料信息?', '提示', {
|
this.$emit('refreshDataList');
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
console.log('121', this.dataForm.name);
|
|
||||||
this.$emit('refreshDataList', {
|
|
||||||
id: response.data,
|
|
||||||
name: this.dataForm.name,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.$emit('refreshDataList');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -447,7 +423,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getDict() {
|
getDict() {
|
||||||
// 产品
|
// 产品
|
||||||
getProductAll().then((res) => {
|
getProductList().then((res) => {
|
||||||
this.productList = res.data || [];
|
this.productList = res.data || [];
|
||||||
});
|
});
|
||||||
// 产线
|
// 产线
|
||||||
|
|||||||
311
src/views/produce/workOrder/allocation copy.vue
Normal file
311
src/views/produce/workOrder/allocation copy.vue
Normal file
@@ -0,0 +1,311 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @LastEditTime: 2024-07-19 18:59:13
|
||||||
|
* @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='formContainer'>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12"><span class='label'>工单名称:</span><span class='text'>{{ dataForm.name }}</span></el-col>
|
||||||
|
<el-col :span="12"><span class='label'>工单编码:</span><span class='text'>{{ dataForm.code }}</span></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12"><span class='label'>产品名称:</span><span class='text'>{{ dataForm.productName }}</span></el-col>
|
||||||
|
<el-col :span="12"><span class='label'>产品规格:</span><span class='text'>{{ dataForm.specifications }}</span></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12"><span class='label'>实际生产数量:</span><span class='text'>{{ dataForm.actualQuantity }}</span></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
|
||||||
|
border
|
||||||
|
:data="tableData"
|
||||||
|
:header-cell-style="{
|
||||||
|
background: '#F2F4F9',
|
||||||
|
color: '#606266'
|
||||||
|
}"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column type="index" label="序号" width='50' align="center" />
|
||||||
|
<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" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width='50' align="center" fixed='right'>
|
||||||
|
<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 './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 {
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
.formContainer {
|
||||||
|
.label {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px 0px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px 0px;
|
||||||
|
font-size: 14px;
|
||||||
|
color:rgba(102, 102, 102, 0.75);
|
||||||
|
}
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -16,98 +16,58 @@
|
|||||||
{{ '分配产量' }}
|
{{ '分配产量' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="formContent">
|
<div class='formContainer'>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
|
<el-col :span="12"><span class='label'>工单名称:</span><span class='text'>{{ dataForm.name }}</span></el-col>
|
||||||
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
|
<el-col :span="12"><span class='label'>工单编码:</span><span class='text'>{{ dataForm.code }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
|
<el-col :span="12"><span class='label'>产品名称:</span><span class='text'>{{ dataForm.productName }}</span></el-col>
|
||||||
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
|
<el-col :span="12"><span class='label'>产品规格:</span><span class='text'>{{ dataForm.specifications }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
|
<el-col :span="12"><span class='label'>实际生产数量:</span><span class='text'>{{ dataForm.actualQuantity }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="attr-list">
|
||||||
<!-- <el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button> -->
|
|
||||||
<el-table
|
<el-table
|
||||||
|
border
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
|
:header-cell-style="{
|
||||||
|
background: '#F2F4F9',
|
||||||
|
color: '#606266'
|
||||||
|
}"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column type="index" label="序号" />
|
<el-table-column type="index" label="序号" width='50' align="center" />
|
||||||
<el-table-column prop="orderName" label="订单名称" />
|
<el-table-column prop="orderName" label="订单名称" />
|
||||||
<el-table-column prop="orderCode" label="订单编码" />
|
<el-table-column prop="orderCode" label="订单编码" />
|
||||||
<el-table-column prop="priority" label="优先级" />
|
<el-table-column prop="priority" label="优先级">
|
||||||
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
{{scope.row.priority == 1 ? '低' : scope.row.priority == 2 ? '正常' : scope.row.priority == 3 ? '高' : ''}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" />
|
||||||
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
|
<el-input-number :disabled='isSaved' v-model="scope.row.actualAssignmentQuantity" style='width: 100%;' controls-position="right" :min="0" :max="dataForm.actualQuantity"></el-input-number>
|
||||||
</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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" type="primary" @click="goback()">关闭</el-button>
|
<el-button plain type="primary" @click="goback()">关闭</el-button>
|
||||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<el-button type="primary" @click="saveData()" :disabled='isSaved'>保存</el-button>
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <attr-add
|
|
||||||
v-if="addOrUpdateVisible"
|
|
||||||
ref="addOrUpdate"
|
|
||||||
:material-id="dataForm.id"
|
|
||||||
@refreshDataList="getList" /> -->
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
import { getConOrderList, updateBatch, getCoreWO } from '@/api/base/coreWorkOrder';
|
||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
// import { parseTime } from '../../core/mixins/code-filter';
|
|
||||||
// import attrAdd from './attr-add';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
@@ -118,100 +78,51 @@ export default {
|
|||||||
urlOptions: {
|
urlOptions: {
|
||||||
infoURL: getCoreWO,
|
infoURL: getCoreWO,
|
||||||
},
|
},
|
||||||
listQuery: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
code: undefined,
|
code: undefined,
|
||||||
productId: '',
|
productId: '',
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
productList: [],
|
|
||||||
materialAttrList: [],
|
|
||||||
materialList: [],
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
isdetail: false,
|
isSaved:false
|
||||||
idAttrShow: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
initData() {
|
saveData() {
|
||||||
// this.materialAttrList.splice(0);
|
console.log(this.tableData)
|
||||||
this.listQuery.total = 0;
|
let sunNum = 0
|
||||||
},
|
this.tableData.forEach(row => {
|
||||||
edit(row) {
|
sunNum+=(row.actualAssignmentQuantity || 0)
|
||||||
row.isEdit = true
|
})
|
||||||
},
|
if (sunNum > this.dataForm.actualQuantity) {
|
||||||
saveData(row) {
|
this.$message.warning('各订单实际分配数量之和不能大于实际生产数量');
|
||||||
if (row.actualAssignmentQuantity) {
|
return
|
||||||
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('请填写实际分配数量');
|
|
||||||
}
|
}
|
||||||
|
updateBatch(this.tableData).then((response) => {
|
||||||
|
this.$modal.msgSuccess('分配成功');
|
||||||
|
this.isSaved = true;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 获取产品Bom详细列表
|
// 获取产品Bom详细列表
|
||||||
getConOrderList({
|
getConOrderList({
|
||||||
...this.listQuery,
|
|
||||||
workOrderId: this.dataForm.id
|
workOrderId: this.dataForm.id
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.tableData = response.data.map(item => {
|
this.tableData = response.data.map(item => {
|
||||||
item.isEdit = false
|
item.actualAssignmentQuantity = item.actualAssignmentQuantity || 0
|
||||||
|
item.workOrderId = this.dataForm.id
|
||||||
return item
|
return item
|
||||||
});
|
});
|
||||||
this.listQuery.total = response.data.total;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 构造一行
|
init(id) {
|
||||||
// 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.dataForm.id = id || undefined;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
// if (id) {
|
this.isSaved = false;
|
||||||
// this.idAttrShow = true
|
|
||||||
// } else {
|
|
||||||
// this.idAttrShow = false
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.$refs['dataForm'].resetFields();
|
|
||||||
|
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
// 获取工单详情
|
// 获取工单详情
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then(response => {
|
||||||
@@ -225,17 +136,6 @@ export default {
|
|||||||
goback() {
|
goback() {
|
||||||
this.$emit('refreshDataList');
|
this.$emit('refreshDataList');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
// this.initData();
|
|
||||||
},
|
|
||||||
goEdit() {
|
|
||||||
this.isdetail = false;
|
|
||||||
},
|
|
||||||
// 新增 / 修改
|
|
||||||
addNew(id) {
|
|
||||||
this.addOrUpdateVisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.addOrUpdate.init(id);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -279,8 +179,7 @@ export default {
|
|||||||
padding-right: 10px; /* 调整滚动条样式 */
|
padding-right: 10px; /* 调整滚动条样式 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-form,
|
.drawer >>> .el-form {
|
||||||
.drawer >>> .attr-list {
|
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,10 +188,19 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
.formContent {
|
.formContainer {
|
||||||
font-size: 16px;
|
.label {
|
||||||
line-height: 1.5;
|
display: inline-block;
|
||||||
|
padding: 5px 0px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px 0px;
|
||||||
|
font-size: 14px;
|
||||||
|
color:rgba(102, 102, 102, 0.75);
|
||||||
|
}
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,12 @@
|
|||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
:limit="listQuery.pageSize"
|
:limit="listQuery.pageSize"
|
||||||
|
:max-height="tableH"
|
||||||
:table-data="tableData">
|
:table-data="tableData">
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="350"
|
:width="300"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
@@ -61,10 +62,11 @@ import {
|
|||||||
getCoreWOList
|
getCoreWOList
|
||||||
} from '@/api/base/coreWorkOrder';
|
} from '@/api/base/coreWorkOrder';
|
||||||
import { listDept } from '@/api/system/dept';
|
import { listDept } from '@/api/system/dept';
|
||||||
|
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicPage],
|
mixins: [basicPage,tableHeightMixin],
|
||||||
components: {
|
components: {
|
||||||
AddWorkOrder,
|
AddWorkOrder,
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
@@ -88,25 +90,25 @@ export default {
|
|||||||
// btnName: '原料信息',
|
// btnName: '原料信息',
|
||||||
// }
|
// }
|
||||||
// : undefined,
|
// : undefined,
|
||||||
// {
|
{
|
||||||
// type: 'active',
|
type: 'active',
|
||||||
// btnName: '激活',
|
btnName: '开始',
|
||||||
// showParam: {
|
showParam: {
|
||||||
// type: '|',
|
type: '|',
|
||||||
// data: [
|
data: [
|
||||||
// {
|
{
|
||||||
// name: 'status',
|
name: 'status',
|
||||||
// type: 'equal',
|
type: 'equal',
|
||||||
// value: 1
|
value: 1
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: 'status',
|
name: 'status',
|
||||||
// type: 'equal',
|
type: 'equal',
|
||||||
// value: 3
|
value: 3
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
type: 'pause',
|
type: 'pause',
|
||||||
btnName: '暂停',
|
btnName: '暂停',
|
||||||
@@ -122,8 +124,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'nullify',
|
type: 'terminate',
|
||||||
btnName: '作废',
|
btnName: '终止',
|
||||||
showParam: {
|
showParam: {
|
||||||
type: '|',
|
type: '|',
|
||||||
data: [
|
data: [
|
||||||
@@ -136,11 +138,6 @@ export default {
|
|||||||
name: 'status',
|
name: 'status',
|
||||||
type: 'equal',
|
type: 'equal',
|
||||||
value: 3
|
value: 3
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'status',
|
|
||||||
type: 'equal',
|
|
||||||
value: 4
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -186,22 +183,36 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:core-work-order:delete`)
|
{
|
||||||
? {
|
type: 'nullify',
|
||||||
type: 'delete',
|
btnName: '作废',
|
||||||
btnName: '删除',
|
showParam: {
|
||||||
showParam: {
|
type: '|',
|
||||||
type: '|',
|
data: [
|
||||||
data: [
|
{
|
||||||
{
|
name: 'status',
|
||||||
name: 'status',
|
type: 'equal',
|
||||||
type: 'equal',
|
value: 1
|
||||||
value: 1
|
}
|
||||||
}
|
]
|
||||||
]
|
}
|
||||||
}
|
},
|
||||||
}
|
// this.$auth.hasPermi(`base:core-work-order:delete`)
|
||||||
: undefined
|
// ? {
|
||||||
|
// type: 'delete',
|
||||||
|
// btnName: '删除',
|
||||||
|
// showParam: {
|
||||||
|
// type: '|',
|
||||||
|
// data: [
|
||||||
|
// {
|
||||||
|
// name: 'status',
|
||||||
|
// type: 'equal',
|
||||||
|
// value: 1
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// : undefined
|
||||||
].filter((v)=>v),
|
].filter((v)=>v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
@@ -230,7 +241,8 @@ export default {
|
|||||||
{ id: 2, name: '激活' },
|
{ id: 2, name: '激活' },
|
||||||
{ id: 3, name: '暂停' },
|
{ id: 3, name: '暂停' },
|
||||||
{ id: 4, name: '完成' },
|
{ id: 4, name: '完成' },
|
||||||
{ id: 9, name: '作废' }
|
{ id: 5, name: '作废' },
|
||||||
|
{ id: 6, name: '终止' }
|
||||||
],
|
],
|
||||||
param: 'status',
|
param: 'status',
|
||||||
clearable: true
|
clearable: true
|
||||||
@@ -279,7 +291,7 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
minWidth: 120,
|
minWidth: 150,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -310,12 +322,20 @@ export default {
|
|||||||
{
|
{
|
||||||
prop: 'triggerOrigin',
|
prop: 'triggerOrigin',
|
||||||
label: '来源',
|
label: '来源',
|
||||||
|
width: 120,
|
||||||
filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
|
filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '工单状态',
|
label: '工单状态',
|
||||||
filter: (val) => ['', '等待', '激活', '暂停', '完成', '', '', '', '', '作废'][val]
|
filter: (val) => ['', '等待', '激活', '暂停', '完成', '作废', '终止', '', '', ''][val]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'startProduceTime',
|
||||||
|
label: '实际开始时间',
|
||||||
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planFinishTime',
|
prop: 'planFinishTime',
|
||||||
@@ -362,20 +382,20 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshWorkOrder(val) {
|
refreshWorkOrder(val) {
|
||||||
console.log(val)
|
// if (val) {
|
||||||
if (val) {
|
// // 预使用原料信息
|
||||||
// 预使用原料信息
|
// console.log('预使用原料信息')
|
||||||
console.log('预使用原料信息')
|
// this.handleCancel()
|
||||||
this.handleCancel()
|
// this.getDataList()
|
||||||
this.getDataList()
|
// this.materialVisible = true;
|
||||||
this.materialVisible = true;
|
// this.addOrEditTitle = "预使用主原料信息";
|
||||||
this.addOrEditTitle = "预使用主原料信息";
|
// this.$nextTick(() => {
|
||||||
this.$nextTick(() => {
|
// this.$refs.material.init(val, true);
|
||||||
this.$refs.material.init(val, true);
|
// });
|
||||||
});
|
// } else {
|
||||||
} else {
|
// this.successSubmit()
|
||||||
this.successSubmit()
|
// }
|
||||||
}
|
this.successSubmit()
|
||||||
},
|
},
|
||||||
closeDetail() {
|
closeDetail() {
|
||||||
this.detailVisible = false
|
this.detailVisible = false
|
||||||
@@ -416,15 +436,18 @@ export default {
|
|||||||
param.status = 3
|
param.status = 3
|
||||||
opration = '暂停'
|
opration = '暂停'
|
||||||
}
|
}
|
||||||
|
if (val.type === 'terminate') {
|
||||||
|
param.status = 6
|
||||||
|
opration = '终止'
|
||||||
|
}
|
||||||
if (val.type === 'nullify') {
|
if (val.type === 'nullify') {
|
||||||
param.status = 9
|
param.status = 5
|
||||||
opration = '报废'
|
opration = '作废'
|
||||||
}
|
}
|
||||||
if (val.type === 'finish') {
|
if (val.type === 'finish') {
|
||||||
param.status = 4
|
param.status = 4
|
||||||
opration = '完成'
|
opration = '完成'
|
||||||
}
|
}
|
||||||
console.log('22',val)
|
|
||||||
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -437,7 +460,9 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList();
|
setTimeout(() => {
|
||||||
|
this.getDataList();
|
||||||
|
}, 1000);
|
||||||
// 分配产量
|
// 分配产量
|
||||||
if (param.status === 4) {
|
if (param.status === 4) {
|
||||||
this.allocationOrder(param);
|
this.allocationOrder(param);
|
||||||
@@ -475,7 +500,6 @@ export default {
|
|||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
|
||||||
this.listQuery.name = val.name ? val.name : undefined;
|
this.listQuery.name = val.name ? val.name : undefined;
|
||||||
this.listQuery.status = val.status ? val.status : undefined;
|
this.listQuery.status = val.status ? val.status : undefined;
|
||||||
this.listQuery.startProduceTime = val.time ? val.time : undefined
|
this.listQuery.startProduceTime = val.time ? val.time : undefined
|
||||||
@@ -484,7 +508,6 @@ export default {
|
|||||||
case 'reset':
|
case 'reset':
|
||||||
this.$refs.searchBarForm.resetForm();
|
this.$refs.searchBarForm.resetForm();
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,23 +1,20 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-09-09 15:39:08
|
* @Date: 2024-09-09 15:39:08
|
||||||
* @LastEditTime: 2024-09-11 10:25:54
|
* @LastEditTime: 2024-11-18 16:43:54
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="button-nav">
|
<div class="button-nav">
|
||||||
<!-- <div class="text-carousel"> -->
|
<!-- <div class="text-carousel"> -->
|
||||||
<el-button style="flex: .1" type="text" @click="prevText" icon="el-icon-caret-left"></el-button>
|
<el-button class='btn' style="flex: .1" type="text" @click="prevText" icon="el-icon-caret-left"></el-button>
|
||||||
<button @click="handleChange(item.id)" v-for="(item,index) in idList" :key="item.id"
|
<button class='tap-btn' @click="handleChange(item.id)" v-for="(item,index) in idList" :key="item.id"
|
||||||
:class="[item.id === currentMenu ? 'active' : '']">{{ item.name }}
|
:class="[item.id === currentMenu ? 'active' : '']">{{ item.name }}
|
||||||
</button>
|
</button>
|
||||||
<el-button style="flex: .1" type="text" @click="nextText" icon="el-icon-caret-right"></el-button>
|
<el-button class='btn' style="flex: .1" type="text" @click="nextText" icon="el-icon-caret-right"></el-button>
|
||||||
<button style="flex: .2;display: inline-block;" @click="goback()">
|
<el-button type="primary" plain style="flex: .2;margin-left: 0px;" @click="goback()"><svg-icon icon-class="return" />返回</el-button>
|
||||||
<svg-icon style="width: 20px; height: 20px" :icon-class=" 'back' " />
|
|
||||||
<span>返回</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -84,16 +81,19 @@ export default {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.button-nav {
|
.button-nav {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 0;
|
padding-bottom:5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
// justify-content: space-around;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
.btn {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
.tap-btn {
|
||||||
|
font-size: 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
@@ -102,7 +102,7 @@ export default {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border-bottom-left-radius: 5px;
|
border-bottom-left-radius: 5px;
|
||||||
border-bottom-right-radius: 5px;
|
border-bottom-right-radius: 5px;
|
||||||
padding: 20px;
|
height: 40px;
|
||||||
color: #888;
|
color: #888;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -50,6 +50,11 @@ export default {
|
|||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
showOverflowtooltip: true,
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'productionName',
|
||||||
|
label: '产品名称',
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
...this.dynamicProps,
|
...this.dynamicProps,
|
||||||
{
|
{
|
||||||
prop: 'sumInput',
|
prop: 'sumInput',
|
||||||
@@ -70,7 +75,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@@ -105,7 +110,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'scrapRatio',
|
prop: 'scrapRatio',
|
||||||
label: '报废比例',
|
label: '报废比例(%)',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
this.downList.push(obj);
|
this.downList.push(obj);
|
||||||
@@ -142,6 +147,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
inspectionContent: item.inspectionContent,
|
inspectionContent: item.inspectionContent,
|
||||||
workOrderName: item.workOrderName,
|
workOrderName: item.workOrderName,
|
||||||
|
productionName: item.productionName,
|
||||||
...keyValuePairs,
|
...keyValuePairs,
|
||||||
sumInput: item.sumInput,
|
sumInput: item.sumInput,
|
||||||
sumOutput: item.sumOutput,
|
sumOutput: item.sumOutput,
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
<!--
|
|
||||||
filename: index.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2023-08-30 14:02:49
|
|
||||||
description: 设备加工数量
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div style="flex: 1; display: flex; background: #f2f4f9">
|
<div style="flex: 1; display: flex; background: #f2f4f9">
|
||||||
<div
|
<div
|
||||||
@@ -21,7 +14,7 @@
|
|||||||
title="点击切换工厂"
|
title="点击切换工厂"
|
||||||
@mouseenter="factoryListOpen = true"
|
@mouseenter="factoryListOpen = true"
|
||||||
@mouseleave="factoryListOpen = false">
|
@mouseleave="factoryListOpen = false">
|
||||||
{{ currentFactory?.label || '点我选择设备' }}
|
{{ currentFactory?.label || '点我选择工厂' }}
|
||||||
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
|
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
|
||||||
<ul
|
<ul
|
||||||
class="factory-list"
|
class="factory-list"
|
||||||
@@ -33,7 +26,7 @@
|
|||||||
:data-value="fc.id"
|
:data-value="fc.id"
|
||||||
class="factory-list__item"
|
class="factory-list__item"
|
||||||
:class="{ 'is-current': fc.id == currentFactory?.id }">
|
:class="{ 'is-current': fc.id == currentFactory?.id }">
|
||||||
<span>
|
<span :data-value="fc.id">
|
||||||
{{ fc.label }}
|
{{ fc.label }}
|
||||||
</span>
|
</span>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
@@ -56,10 +49,6 @@
|
|||||||
:empty-text="''"
|
:empty-text="''"
|
||||||
icon-class="custom-icon-class"
|
icon-class="custom-icon-class"
|
||||||
@node-click="handleSidebarItemClick">
|
@node-click="handleSidebarItemClick">
|
||||||
<!-- <div class="custom-tree-node" slot-scope="{ node, data }">
|
|
||||||
<span class="icon"></span>
|
|
||||||
<span>{{ node.label }}</span>
|
|
||||||
</div> -->
|
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -106,20 +95,16 @@
|
|||||||
<div v-else class="no-data-bg"></div>
|
<div v-else class="no-data-bg"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <transition appear name="vvv" mode="out-in"></transition> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import Graph from './graph.vue';
|
|
||||||
import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters';
|
import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters';
|
||||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||||
export default {
|
export default {
|
||||||
name: 'EquipmentProcessAmount',
|
name: 'EquipmentProcessAmount',
|
||||||
// components: { Graph },
|
|
||||||
mixins: [tableHeightMixin],
|
mixins: [tableHeightMixin],
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
@@ -139,92 +124,7 @@ export default {
|
|||||||
{ name: '5', value: 5 },
|
{ name: '5', value: 5 },
|
||||||
{ name: '6', value: 6 },
|
{ name: '6', value: 6 },
|
||||||
],
|
],
|
||||||
sidebarContent: [
|
sidebarContent: [],
|
||||||
// {
|
|
||||||
// id: 'fc1',
|
|
||||||
// name: '工厂',
|
|
||||||
// lines: [
|
|
||||||
// {
|
|
||||||
// name: '产线1',
|
|
||||||
// id: 'pl1',
|
|
||||||
// sections: [
|
|
||||||
// {
|
|
||||||
// name: '工段1',
|
|
||||||
// id: 'pl1ws1',
|
|
||||||
// equipments: [
|
|
||||||
// {
|
|
||||||
// name: '设备1',
|
|
||||||
// id: 'pl1ws1--eq1',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '设备2',
|
|
||||||
// id: 'pl1ws1--eq2',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '设备3',
|
|
||||||
// id: 'pl1ws1--eq3',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '工段2',
|
|
||||||
// id: 'pl1ws2',
|
|
||||||
// equipments: [
|
|
||||||
// {
|
|
||||||
// name: '设备1',
|
|
||||||
// id: 'pl2ws1--eq1',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '设备2',
|
|
||||||
// id: 'pl2ws1--eq2',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '设备3',
|
|
||||||
// id: 'pl2ws1--eq3',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '工段3',
|
|
||||||
// id: 'pl1ws3',
|
|
||||||
// equipments: [
|
|
||||||
// {
|
|
||||||
// name: '设备1',
|
|
||||||
// id: 'pl3ws1--eq1',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '设备2',
|
|
||||||
// id: 'pl3ws1--eq2',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '设备3',
|
|
||||||
// id: 'pl3ws1--eq3',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '产线2',
|
|
||||||
// id: 'pl2',
|
|
||||||
// sections: [
|
|
||||||
// {
|
|
||||||
// name: '工段1',
|
|
||||||
// id: 'pl2ws1',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '工段2',
|
|
||||||
// id: 'pl2ws2',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '工段3',
|
|
||||||
// id: 'pl2ws3',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
tableList: [],
|
tableList: [],
|
||||||
queryParams: {
|
queryParams: {
|
||||||
id: null,
|
id: null,
|
||||||
@@ -241,6 +141,7 @@ export default {
|
|||||||
param: 'workOrderId',
|
param: 'workOrderId',
|
||||||
onchange: true,
|
onchange: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
|
clearable: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
@@ -264,20 +165,6 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'separate',
|
type: 'separate',
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// type: 'button',
|
|
||||||
// btnName: '表格',
|
|
||||||
// name: 'table',
|
|
||||||
// plain: true,
|
|
||||||
// color: 'success',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'button',
|
|
||||||
// btnName: '图表',
|
|
||||||
// name: 'graph',
|
|
||||||
// plain: true,
|
|
||||||
// color: 'warning',
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:equipment-group:export')
|
type: this.$auth.hasPermi('base:equipment-group:export')
|
||||||
? 'button'
|
? 'button'
|
||||||
@@ -291,15 +178,12 @@ export default {
|
|||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'lineName', label: '产线' },
|
{ prop: 'lineName', label: '产线' },
|
||||||
{ prop: 'sectionName', label: '工段' },
|
{ prop: 'sectionName', label: '工段' },
|
||||||
// { prop: 'externalCode', label: '设备编码' },
|
|
||||||
{ prop: 'equipmentId', label: '设备编码' },
|
{ prop: 'equipmentId', label: '设备编码' },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称' },
|
||||||
{ prop: 'totalQuantity', label: '加工数量' },
|
{ prop: 'totalQuantity', label: '加工数量' },
|
||||||
],
|
],
|
||||||
mode: 'table', // table | graph
|
mode: 'table', // table | graph
|
||||||
queryParams: {
|
queryParams: {
|
||||||
// pageNo: 1,
|
|
||||||
// pageSize: 999,
|
|
||||||
recordTime: [],
|
recordTime: [],
|
||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
lineId: null,
|
lineId: null,
|
||||||
@@ -313,28 +197,10 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// mounted() {
|
|
||||||
// },
|
|
||||||
computed: {
|
computed: {
|
||||||
// id() {
|
|
||||||
// return this.$route.params.equipmentId;
|
|
||||||
// },
|
|
||||||
// code() {
|
|
||||||
// return this.$route.params.equipmentCode;
|
|
||||||
// },
|
|
||||||
// name() {
|
|
||||||
// return this.$route.params.equipmentName;
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict();
|
this.getDict();
|
||||||
// if (this.id) this.$set(this.queryParams, 'id', this.id);
|
|
||||||
// if (this.code)
|
|
||||||
// this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.code);
|
|
||||||
// if (this.name)
|
|
||||||
// this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name);
|
|
||||||
|
|
||||||
// this.handleResponse();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSearchBarChanged({ param, value }) {
|
handleSearchBarChanged({ param, value }) {
|
||||||
@@ -349,28 +215,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDict() {
|
getDict() {
|
||||||
// 获取产品的属性列表
|
|
||||||
// getCustomerList().then((response) => {
|
|
||||||
// console.log(response);
|
|
||||||
// this.customerList = response.data
|
|
||||||
// // this.listQuery.total = response.data.total;
|
|
||||||
// })
|
|
||||||
// getModelList().then((response) => {
|
|
||||||
// console.log(response);
|
|
||||||
// this.modelList = response.data
|
|
||||||
// // this.listQuery.total = response.data.total;
|
|
||||||
// })
|
|
||||||
getWorkOrderList().then((res) => {
|
getWorkOrderList().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// console.log(response);
|
|
||||||
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
|
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
|
||||||
// this.listQuery.total = response.data.total;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buildProps(table) {
|
buildProps(table) {
|
||||||
@@ -532,12 +384,9 @@ export default {
|
|||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
this.sidebarContent = res.data;
|
this.sidebarContent = res.data;
|
||||||
this.buildTree(res.data);
|
this.buildTree(res.data);
|
||||||
|
this.currentFactory = null
|
||||||
console.log('tree', this.sidebarContent);
|
console.log('tree', this.sidebarContent);
|
||||||
// console.log(this.formConfig[0].selectOptions);
|
|
||||||
// this.listQuery.total = response.data.total;
|
|
||||||
});
|
});
|
||||||
// const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder');
|
|
||||||
// console.log(data)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleTabClick(tab, event) {
|
handleTabClick(tab, event) {
|
||||||
@@ -549,6 +398,7 @@ export default {
|
|||||||
const fcId = event.target.dataset.value;
|
const fcId = event.target.dataset.value;
|
||||||
this.handleSidebarItemClick({ id: fcId, type: '工厂' });
|
this.handleSidebarItemClick({ id: fcId, type: '工厂' });
|
||||||
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
|
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
|
||||||
|
console.log('factory change', this.currentFactory);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSidebarItemClick({ label, id, type }) {
|
handleSidebarItemClick({ label, id, type }) {
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ export default {
|
|||||||
query: {
|
query: {
|
||||||
id: val.data.processFlowId,
|
id: val.data.processFlowId,
|
||||||
orderId: val.data.id,
|
orderId: val.data.id,
|
||||||
|
lineId: val.data.lineId,
|
||||||
name: val.data.name,
|
name: val.data.name,
|
||||||
specifications: res.data.specifications,
|
specifications: res.data.specifications,
|
||||||
productName: val.data.planProductName,
|
productName: val.data.planProductName,
|
||||||
|
|||||||
@@ -8,9 +8,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="process-bom">
|
<section class="process-bom">
|
||||||
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
<!-- <small-title :no-padding="true">
|
|
||||||
设备名称: {{ name }}
|
|
||||||
</small-title> -->
|
|
||||||
<div class="btns" style="
|
<div class="btns" style="
|
||||||
text-align: right;
|
text-align: right;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -18,14 +15,7 @@
|
|||||||
right: 20px;
|
right: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
">
|
">
|
||||||
<!-- <el-input icon="el-icon-search" placeholder="搜索" v-model="searchText" style="margin-left: 20px">
|
|
||||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
||||||
</el-input>
|
|
||||||
<el-button type="primary" plain :disabled="currentDet == null" class="btn-create" icon="el-icon-plus">
|
|
||||||
分配设备
|
|
||||||
</el-button> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-row>
|
<el-row>
|
||||||
<div style="margin-bottom: 10px;font-size: 16px;">设备名称:{{ name }}</div>
|
<div style="margin-bottom: 10px;font-size: 16px;">设备名称:{{ name }}</div>
|
||||||
@@ -51,7 +41,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import SmallTitle from './SmallTitle';
|
|
||||||
import {
|
import {
|
||||||
getDetMaterial,
|
getDetMaterial,
|
||||||
getDetValue
|
getDetValue
|
||||||
@@ -59,9 +48,6 @@ import {
|
|||||||
import StatusBtn from './statusBtn.vue'
|
import StatusBtn from './statusBtn.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'ProcessBom',
|
name: 'ProcessBom',
|
||||||
components: {
|
|
||||||
// SmallTitle
|
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
currentDet: {
|
currentDet: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -77,7 +63,6 @@ export default {
|
|||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
@@ -94,13 +79,6 @@ export default {
|
|||||||
color: 'primary',
|
color: 'primary',
|
||||||
},],
|
},],
|
||||||
materialTableProps: [
|
materialTableProps: [
|
||||||
// {
|
|
||||||
// prop: 'createTime',
|
|
||||||
// label: '添加时间',
|
|
||||||
// fixed: true,
|
|
||||||
// width: 180,
|
|
||||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
||||||
// },
|
|
||||||
{ prop: 'name', label: '物料名称' },
|
{ prop: 'name', label: '物料名称' },
|
||||||
{ prop: 'planNum', label: '预计使用数量' },
|
{ prop: 'planNum', label: '预计使用数量' },
|
||||||
{ prop: 'actualNum', label: '实际使用数量' },
|
{ prop: 'actualNum', label: '实际使用数量' },
|
||||||
@@ -181,22 +159,13 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleSearchBarBtnClick(val) {
|
handleSearchBarBtnClick(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
getDetMaterial({
|
this.queryParams.startTime = val.timeVal.length > 0 ? val.timeVal[0] : ''
|
||||||
pageNo: 1,
|
this.queryParams.endTime = val.timeVal.length > 0 ? val.timeVal[1] : ''
|
||||||
pageSize: 10,
|
if (this.activeName === 'material') {
|
||||||
orderId: this.$route.query.orderId,
|
this.getDetMaterialMes()
|
||||||
flowDetId: [this.detId],
|
}else {
|
||||||
// orderId: this.$route.query.orderId,
|
this.getDetValueMes()
|
||||||
|
}
|
||||||
},).then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
})
|
|
||||||
// if (timeVal && timeVal.length > 0) {
|
|
||||||
// this.queryParams.time = timeVal;
|
|
||||||
// } else {
|
|
||||||
// this.queryParams.time = [];
|
|
||||||
// }
|
|
||||||
// await this.handleQuery();
|
|
||||||
},
|
},
|
||||||
handleEmitFun() { },
|
handleEmitFun() { },
|
||||||
handleTableBtnClick() { },
|
handleTableBtnClick() { },
|
||||||
@@ -220,61 +189,44 @@ export default {
|
|||||||
data: method !== 'get' ? payload : null,
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleTabClick() {
|
||||||
// getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
|
|
||||||
// console.log('get list')
|
|
||||||
|
|
||||||
// },
|
|
||||||
handleTabClick(val) {
|
|
||||||
// console.log(this.activeName);
|
|
||||||
if (this.activeName === 'material') {
|
if (this.activeName === 'material') {
|
||||||
getDetMaterial({
|
this.getDetMaterialMes()
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
orderId: this.$route.query.orderId,
|
|
||||||
flowDetId: [this.detId],
|
|
||||||
// orderId: this.$route.query.orderId,
|
|
||||||
|
|
||||||
},).then((res) => {
|
|
||||||
if (res.data.length != []) {
|
|
||||||
this.materialList = res.data[0].data
|
|
||||||
this.name = res.data[0].name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
getDetValue({
|
this.getDetValueMes()
|
||||||
pageNo: 1,
|
}
|
||||||
pageSize: 10,
|
},
|
||||||
|
getList(val) {
|
||||||
|
this.getDetMaterialMes()
|
||||||
|
},
|
||||||
|
clearList() {
|
||||||
|
this.list = [];
|
||||||
|
},
|
||||||
|
getDetMaterialMes() {
|
||||||
|
getDetMaterial({
|
||||||
|
orderId: this.$route.query.orderId,
|
||||||
|
lineId: this.$route.query.lineId,
|
||||||
|
flowDetId: [this.detId],
|
||||||
|
...this.queryParams
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.data.length != []) {
|
||||||
|
this.materialList = res.data[0].data
|
||||||
|
this.name = res.data[0].name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDetValueMes() {
|
||||||
|
getDetValue({
|
||||||
orderId: this.$route.query.orderId,
|
orderId: this.$route.query.orderId,
|
||||||
flowDetId: [this.detId],
|
flowDetId: [this.detId],
|
||||||
// orderId: this.$route.query.orderId,
|
...this.queryParams
|
||||||
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.data.length != []) {
|
if (res.data.length != []) {
|
||||||
this.valueList = res.data[0].data
|
this.valueList = res.data[0].data
|
||||||
this.name = res.data[0].name
|
this.name = res.data[0].name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
getList(val) {
|
|
||||||
console.log(val);
|
|
||||||
getDetMaterial({
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
orderId: this.$route.query.orderId,
|
|
||||||
flowDetId: [this.detId],
|
|
||||||
}).then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.data.length != []) {
|
|
||||||
this.materialList = res.data[0].data
|
|
||||||
this.name = res.data[0].name
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clearList() {
|
|
||||||
this.list = [];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
console.log(this.$route.query)
|
},
|
||||||
|
activated() {
|
||||||
|
this.getInfo()
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '检测时间',
|
||||||
dateType: 'daterange', // datetimerange
|
dateType: 'daterange', // datetimerange
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
@@ -182,7 +182,7 @@ export default {
|
|||||||
checkPerson: undefined,
|
checkPerson: undefined,
|
||||||
workOrderId: undefined,
|
workOrderId: undefined,
|
||||||
checkTime: undefined,
|
checkTime: undefined,
|
||||||
source: undefined,
|
source: 1,
|
||||||
workOrderId: undefined,
|
workOrderId: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
@@ -257,7 +257,7 @@ export default {
|
|||||||
sectionId: undefined,
|
sectionId: undefined,
|
||||||
checkPerson: undefined,
|
checkPerson: undefined,
|
||||||
checkTime: undefined,
|
checkTime: undefined,
|
||||||
source: undefined,
|
source: 1,
|
||||||
workOrderId: undefined,
|
workOrderId: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
productionLineId: undefined,
|
productionLineId: undefined,
|
||||||
|
|||||||
@@ -133,8 +133,6 @@ import {
|
|||||||
getDetList,
|
getDetList,
|
||||||
getLineList,
|
getLineList,
|
||||||
} from '@/api/base/qualityScrapLog';
|
} from '@/api/base/qualityScrapLog';
|
||||||
// import { getList } from '@/api/base/qualityScrapType';
|
|
||||||
import moment from 'moment';
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -166,16 +164,14 @@ export default {
|
|||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
workOrderId: [
|
workOrderId: [
|
||||||
{ required: true, message: '工单号不能为空', trigger: 'change' },
|
{ required: true, message: '工单名称不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
||||||
detId: [
|
detId: [
|
||||||
{ required: true, message: '报废原因不能为空', trigger: 'change' },
|
{ required: true, message: '报废原因不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
|
|
||||||
logTime: [
|
logTime: [{ required: true, message: '报废时间不能为空', trigger: 'change' }],
|
||||||
{ required: true, message: '报废时间不能为空', trigger: 'change' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
showDetail: false,
|
showDetail: false,
|
||||||
};
|
};
|
||||||
@@ -193,10 +189,9 @@ export default {
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
this.dataForm = res.data;
|
this.dataForm = res.data;
|
||||||
this.dataForm.logTime = res.data.logTime || null;
|
this.dataForm.logTime = res.data.logTime || null;
|
||||||
console.log('==================');
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.logTime = moment().format('yyyy-MM-DD hh:mm:ss');
|
this.dataForm.logTime = Date.now();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
|
||||||
export default {
|
export default {
|
||||||
name: "StatusBtn2",
|
name: "StatusBtn2",
|
||||||
props: {
|
props: {
|
||||||
@@ -15,7 +16,14 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
state() {
|
state() {
|
||||||
return this.injectData.status === 1 ? "关闭" : "开启";
|
let label = ''
|
||||||
|
getDictDatas(DICT_TYPE.COMMON_STATUS).forEach((item) => {
|
||||||
|
if (parseInt(item.value) === this.injectData.status) {
|
||||||
|
label = item.label;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return label
|
||||||
|
// return this.injectData.status === 1 ? "关闭" : "开启";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,12 +21,12 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
label="部门名称"
|
label="部门名称"
|
||||||
width="260"></el-table-column>
|
min-width="260"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="leader"
|
prop="leader"
|
||||||
label="负责人"
|
label="负责人"
|
||||||
:formatter="userNicknameFormat"
|
:formatter="userNicknameFormat"
|
||||||
width="120" />
|
min-width="120" />
|
||||||
<el-table-column prop="sort" label="排序" width="200"></el-table-column>
|
<el-table-column prop="sort" label="排序" width="200"></el-table-column>
|
||||||
<el-table-column prop="status" label="状态" width="100">
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
width="200">
|
min-width="200">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -45,45 +45,45 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
|
width="160"
|
||||||
class-name="small-padding fixed-width">
|
class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['system:dept:update']">
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="handleAdd(scope.row)"
|
@click="handleAdd(scope.row)"
|
||||||
v-hasPermi="['system:dept:create']">
|
v-hasPermi="['system:dept:create']">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<span
|
||||||
|
v-hasPermi="['system:dept:update']"
|
||||||
|
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
|
||||||
|
>|</span
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:dept:update']">
|
||||||
|
<svg-icon icon-class="table_edit" style='font-size: 16px;'></svg-icon>
|
||||||
|
</el-button>
|
||||||
|
<span
|
||||||
|
v-if="scope.row.parentId !== 0"
|
||||||
|
v-hasPermi="['system:dept:delete']"
|
||||||
|
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
|
||||||
|
>|</span
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.parentId !== 0"
|
v-if="scope.row.parentId !== 0"
|
||||||
size="mini"
|
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:dept:delete']">
|
v-hasPermi="['system:dept:delete']">
|
||||||
删除
|
<svg-icon icon-class="table_delete"></svg-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog">
|
<base-dialog :dialogVisible="open" :dialogTitle="title" width="800px" class="dialog" :before-close='cancel'>
|
||||||
<template #title>
|
|
||||||
<slot name="title">
|
|
||||||
<div class="titleStyle">{{ title }}</div>
|
|
||||||
</slot>
|
|
||||||
</template>
|
|
||||||
<slot />
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@@ -117,9 +117,9 @@
|
|||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in users"
|
v-for="item in users"
|
||||||
:key="parseInt(item.id)"
|
:key="item.id"
|
||||||
:label="item.nickname"
|
:label="item.nickname"
|
||||||
:value="parseInt(item.id)" />
|
:value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
<el-button class="btnTextStyle" @click="cancel">取 消</el-button>
|
<el-button class="btnTextStyle" @click="cancel">取 消</el-button>
|
||||||
<el-button type="primary" class="btnTextStyle" @click="submitForm">确 定</el-button>
|
<el-button type="primary" class="btnTextStyle" @click="submitForm">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ export default {
|
|||||||
return '未设置';
|
return '未设置';
|
||||||
}
|
}
|
||||||
for (const user of this.users) {
|
for (const user of this.users) {
|
||||||
if (row.leaderUserId === user.id) {
|
if (row.leaderUserId == user.id) {
|
||||||
return user.nickname;
|
return user.nickname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user