Compare commits

...

2 Commits

Author SHA1 Message Date
d14dae86fc Merge pull request '工单' (#408) from projects/mes-zjl into projects/mes-test
Reviewed-on: #408
2024-11-21 15:55:47 +08:00
492b591fa9 工单 2024-11-21 15:55:02 +08:00
8 changed files with 117 additions and 141 deletions

View File

@ -263,6 +263,9 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
deptId:[
{ required: true, message: '负责部门不能为空', trigger: 'change' },
],
}, },
productList: [], productList: [],
processFlowList: [], processFlowList: [],

View File

@ -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" />
返回 返回
@ -421,6 +421,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;

View File

@ -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;

View File

@ -327,8 +327,6 @@ export default {
{ id: 1, name: '普通' }, { id: 1, name: '普通' },
{ id: 2, name: '特殊' }, { id: 2, name: '特殊' },
], ],
planStartTime: '',
planFinishTime: '',
isBind: false, isBind: false,
workOrderList: [], workOrderList: [],
}; };
@ -369,11 +367,14 @@ 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);
} }

View File

@ -16,26 +16,31 @@
{{ '分配产量' }} {{ '分配产量' }}
</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-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="优先级" />
@ -49,7 +54,7 @@
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input> <el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" width='50' align="center" fixed='right'>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button> <el-button type="text" size="small" @click="saveData(scope.row)">保存</el-button>
<!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑"> <!-- <el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
@ -279,8 +284,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 +293,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>

View File

@ -6,13 +6,6 @@
* @Description: * @Description:
--> -->
<template> <template>
<!-- <el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
size="50%"> -->
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column"> <div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row v-show="workOrderButton.length !== 0" class="" style=" <el-row v-show="workOrderButton.length !== 0" class="" style="
margin-bottom: 4px; margin-bottom: 4px;
@ -26,50 +19,42 @@
flex: .3; flex: .3;
margin-bottom: 12px; margin-bottom: 12px;
background: #fff; background: #fff;
padding: 16px 16px px; padding: 16px;
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
"> ">
<div class="content"> <div class="content">
<div> <div>
<h1>工单编码{{ dataForm.code }}</h1> <h1 class='orderTitle'>工单编码{{ dataForm.code }}</h1>
</div> </div>
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true"> <small-title style="margin: 16px 0" size="sm" :no-padding="true">
基本信息 基本信息
</small-title> </small-title>
<div class="formContent"> <div class="formContent">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col> <el-col :span="4"><p class='title'>工单名称</p><p class='text'>{{ dataForm.name }}</p></el-col>
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}} <el-col :span="4"><p class='title'>工单来源</p><p class='text'>{{ dataForm.triggerOrigin === 1 ? 'MES-手动' : (dataForm.triggerOrigin === 2 ? 'MES-订单下发' : (dataForm.triggerOrigin === 3 ? 'ERP' : ''))}}</p>
</el-col> </el-col>
<el-col :span="8">所属订单: <el-col :span="4"><p class='title'>所属订单</p>
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName <p class='text' style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;' :title="orderList.map(item => item.orderName).join(', ')">{{ orderList.map(item => item.orderName).join(', ') }}</p>
}}</span>
</el-col> </el-col>
</el-row> <el-col :span="4"><p class='title'>产品名称</p><p class='text'>{{ dataForm.productName }}</p></el-col>
<el-row :gutter="20"> <el-col :span="4"><p class='title'> </p><p class='text'>{{ dataForm.specifications }}</p></el-col>
<el-col :span="8">产品名称:{{ dataForm.productName }}</el-col> <el-col :span="4"><p class='title'>计划生产数量</p><p class='text'>{{ dataForm.planQuantity }}</p></el-col>
<el-col :span="8"> :{{ dataForm.specifications }}</el-col> <el-col :span="4"><p class='title'>预计用时(小时)</p><p class='text'>{{ dataForm.remainingTime }}</p></el-col>
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col> <el-col :span="4"><p class='title'>计划投入数量</p><p class='text'>{{ dataForm.planAssignQuantity }}</p></el-col>
</el-row> <el-col :span="4"><p class='title'>优先级</p><p class='text'> {{ fitlerP(dataForm.priority) }}</p></el-col>
<el-row :gutter="20"> <el-col :span="4"><p class='title'>负责人</p><p class='text'>{{ dataForm.workers }}</p></el-col>
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col> <el-col :span="4"><p class='title'>关联产线</p>
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col> <p class='text'><span v-for="(item, index) in dataForm.productLineIds" :key="index" style="margin-right: 10px">{{ item.lineName
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col> }}</span></p>
</el-row>
<el-row :gutter="20">
<el-col :span="8">负责人:{{ dataForm.workers }}</el-col>
<el-col :span="8">关联产线:
<span v-for="(item, index) in dataForm.productLineIds" :key="index" style="margin-right: 10px">{{ item.lineName
}}</span>
</el-col> </el-col>
<el-col :span="8">物料计算方式:{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' <el-col :span="4"><p class='title'>物料计算方式</p><p class='text'>{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展'
: :
'' }}</el-col> '' }}</p></el-col>
</el-row>
<el-row :gutter="20"> <el-col :span="4"><p class='title'>关联工艺</p><p class='text'>{{ dataForm.processFlowName }}</p></el-col>
<el-col :span="8">关联工艺:{{ dataForm.processFlowName }}</el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -78,8 +63,8 @@
height: 1px; height: 1px;
flex: 1; flex: 1;
margin-bottom: 12px; margin-bottom: 12px;
padding: 16px;
background: #fff; background: #fff;
padding: 16px 16px 32px;
border-radius: 8px; border-radius: 8px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -88,23 +73,17 @@
<el-tab-pane label="生产信息" name="produce"> <el-tab-pane label="生产信息" name="produce">
<div class="formContent"> <div class="formContent">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col> <el-col :span="4"><p class='title'>工单创建时间</p><p class='text'>{{ parseTime(dataForm.createTime) }}</p></el-col>
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col> <el-col :span="4"><p class='title'>计划开始时间</p><p class='text'>{{ parseTime(dataForm.planStartTime) }}</p></el-col>
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col> <el-col :span="4"><p class='title'>计划完成时间</p><p class='text'>{{ parseTime(dataForm.planFinishTime) }}</p></el-col>
</el-row> <el-col :span="4"><p class='title'>预计结束时间</p><p class='text'>{{ parseTime(dataForm.expectedFinishTime) }}</p></el-col>
<el-row :gutter="20"> <el-col :span="4"><p class='title'>实际开始时间</p><p class='text'>{{ parseTime(dataForm.startProduceTime) }}</p></el-col>
<el-col :span="8">预计结束时间:{{ parseTime(dataForm.computeFinishTime) }}</el-col> <el-col :span="4"><p class='title'>实际完成时间</p><p class='text'>{{ parseTime(dataForm.finishProduceTime) }}</p></el-col>
<el-col :span="8">实际开始时间:{{ parseTime(dataForm.startProduceTime) }}</el-col> <el-col :span="4"><p class='title'>工单状态</p><p class='text'>{{ fitlerS(dataForm.status) }}</p></el-col>
<el-col :span="8">实际完成时间:{{ parseTime(dataForm.finishProduceTime) }}</el-col> <el-col :span="4"><p class='title'>实际投入数量</p><p class='text'>{{ dataForm.assignQuantity }}</p></el-col>
</el-row> <el-col :span="4"><p class='title'>实际生产数量</p><p class='text'>{{ dataForm.actualQuantity }}</p></el-col>
<el-row :gutter="20"> <el-col :span="4"><p class='title'>废片数量</p><p class='text'>{{ dataForm.nokQuantity }}</p></el-col>
<el-col :span="8">工单状态:{{ fitlerS(dataForm.status) }}</el-col> <el-col :span="4"><p class='title'>检测瑕疵数</p><p class='text'>{{ dataForm.unpassCheckNum }}</p></el-col>
<el-col :span="8">实际投入数量:{{ dataForm.assignQuantity }}</el-col>
<el-col :span="8">实际生产数量:{{ dataForm.actualQuantity }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">废片数量:{{ dataForm.nokQuantity }}</el-col>
<el-col :span="8">检测瑕疵数:{{ }}</el-col>
</el-row> </el-row>
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -189,11 +168,6 @@ const tableProps = [
prop: 'orderCode', prop: 'orderCode',
label: '订单编码', label: '订单编码',
}, },
{
prop: 'priority',
label: '优先级',
filter: (val) => ['', '低', '正常', '高'][val]
},
{ {
prop: 'planAssignmentQuantity', prop: 'planAssignmentQuantity',
label: '计划分配数量', label: '计划分配数量',
@ -370,7 +344,7 @@ export default {
name: work.name name: work.name
} }
}) })
// console.log(this.workOrderButton); console.log('this.workOrderButton======',this.workOrderButton);
this.init(this.workOrderButton[0].id, true) this.init(this.workOrderButton[0].id, true)
}) })
} else { } else {
@ -583,59 +557,23 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.drawer >>> .el-drawer { .orderTitle {
border-radius: 8px 0 0 8px; font-size: 16px;
display: flex; font-weight: bold;
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: 10px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
} }
.formContent { .formContent {
font-size: 16px; font-size: 14px;
line-height: 1.5; .title {
margin-bottom: 10px; font-weight: 600;
width: 100%; color:rgba(0, 0, 0, 0.85);
margin: 0px;
}
.text {
height: 20px;
color:rgba(102, 102, 102, 0.75);
margin: 10px 0px;
}
} }
.action_btn { .action_btn {
float: right; float: right;

View File

@ -4,6 +4,7 @@
:formConfigs="formConfig" :formConfigs="formConfig"
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<el-button @click='testtest'>test测试分配产量的按钮</el-button>
<base-table <base-table
v-loading="dataListLoading" v-loading="dataListLoading"
:table-props="tableProps" :table-props="tableProps"
@ -358,6 +359,12 @@ export default {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
testtest() {
this.allocationVisible = true;
this.$nextTick(() => {
this.$refs.allocation.init("1854697306771206146", true);
});
},
getWorkOrder() { getWorkOrder() {
getCoreWOList().then(res => { getCoreWOList().then(res => {
this.formConfig[0].selectOptions = res.data.map(item => { this.formConfig[0].selectOptions = res.data.map(item => {

View File

@ -9,14 +9,12 @@
<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>
<span>返回</span>
</button>
</div> </div>
<!-- </div> --> <!-- </div> -->
</div> </div>
@ -83,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;
@ -101,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;