This commit is contained in:
朱菊兰 2025-01-24 14:28:28 +08:00
parent f5cfc5d2bb
commit 881eace12f
12 changed files with 143 additions and 162 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -103,21 +103,6 @@
style="width: 100%"></el-input-number>
</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
@ -148,11 +133,6 @@
</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-row>
<el-row :gutter="20">
<el-col :span="24">
@ -293,10 +273,8 @@ export default {
deptId: undefined,
planQuantity: 0,
materialMethod: 1,
priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }],
type: '',
workers: '',
planAssignmentQuantity: '',
},
deptList: [],
@ -304,6 +282,9 @@ export default {
name: [
{ required: true, message: '工单名称不能为空', trigger: 'blur' },
],
workOrderId:[
{ required: true, message: '工单名称不能为空', trigger: 'change' },
],
planProductId: [
{ required: true, message: '产品名称不能为空', trigger: 'change' },
],
@ -476,9 +457,6 @@ export default {
? moment(res.data.planFinishTime)
.format('YYYY-MM-DD HH:mm:ss')
: null;
this.form.priority = res.data.priority
? res.data.priority + ''
: '';
// 线
if (this.form.materialMethod === 2) {
this.form.productLineIds.forEach((item) => {

View File

@ -56,16 +56,6 @@
</el-select>
</el-form-item>
</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-form-item label="包装规格" prop="packSpec">
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
@ -75,7 +65,9 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
</el-row>
<el-row :gutter="20">
<el-col :span='24'>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input>
</el-form-item>
@ -99,9 +91,7 @@ export default {
planQuantity: '',
planProductId: '',
specifications:undefined,
price: '',
customerId: '',
priority: '',
packSpec: '',
workers: '',
materialMethod: 1,
@ -114,7 +104,8 @@ export default {
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
code: [{ 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: [],
customerList: [],
@ -142,9 +133,7 @@ export default {
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
@ -235,7 +224,6 @@ export default {
formClear() {
this.$refs.orderAddForm.resetFields()
this.form.materialMethod = 1
this.form.price = 0.00
this.form.planQuantity = 0
this.isEdit = false
}

View File

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

View File

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

View File

@ -116,10 +116,6 @@
<div class="blodTip">备注</div>
<div class="lightTip">{{ orderMsg.remark }}</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>
@ -249,10 +245,6 @@ const tableProps1 = [
filter: (val) => (val ? val.join(',') : ''),
showOverflowtooltip: true,
},
{
prop: 'workers',
label: '负责人',
},
{
prop: 'remark',
label: '备注',

View File

@ -133,13 +133,6 @@
</el-select>
</el-form-item>
</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 :gutter="20">
<el-col :span="12">
@ -288,7 +281,6 @@ export default {
priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }],
type: '',
workers: '',
status: 1,
},
rules: {

View File

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