1026修改
This commit is contained in:
parent
0c8fd90feb
commit
e246e6f33b
|
@ -966,7 +966,7 @@ const routes = [
|
||||||
"name": "samOrder",
|
"name": "samOrder",
|
||||||
"path": "/sam/samOrder",
|
"path": "/sam/samOrder",
|
||||||
"meta": {
|
"meta": {
|
||||||
"title": "订单",
|
"title": "订单管理",
|
||||||
"icon": "el-icon-cellphone",
|
"icon": "el-icon-cellphone",
|
||||||
"perms": ["sam"]
|
"perms": ["sam"]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,43 +1,40 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container style="flex-direction: column">
|
<el-container style="flex-direction: column">
|
||||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||||
<el-header>
|
<div class="right-panel btnsContainer">
|
||||||
<div class="left-panel">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增任务</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增任务</el-button>
|
||||||
|
<el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务分解</el-button>
|
||||||
|
<el-button type="primary" @click="utaskAssgin" v-loading="isloading">任务下达</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.date"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始时间"
|
|
||||||
end-placeholder="结束时间"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
/>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleQuery"
|
|
||||||
>查询</el-button>
|
|
||||||
</div>
|
|
||||||
</el-header>
|
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="混料工序" name="8车间">
|
<el-tab-pane label="混料工序" name="8车间">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table8"
|
||||||
:apiObj="apiUtask"
|
:apiObj="apiUtask"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="topHeight"
|
:height="topHeight"
|
||||||
:params="paramsUtask8"
|
:params="paramsUtask8"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="selection" width="40" />
|
||||||
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="型号" prop="number">
|
<el-table-column label="型号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="任务状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="任务量" prop="number">
|
<el-table-column label="任务量" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划量" prop="count">
|
<el-table-column label="计划量" prop="count">
|
||||||
|
@ -54,20 +51,18 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="要求描述" prop="count">
|
<el-table-column label="要求描述" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="120">
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-link type="primary" @click="table_show(scope.row)">
|
||||||
type="primary"
|
查看
|
||||||
@click="table_edit(scope.row)"
|
|
||||||
v-auth="'pu_plan.update'"
|
|
||||||
>编辑
|
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10"></el-divider>
|
||||||
<el-link
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
type="danger"
|
编辑
|
||||||
@click="table_del(scope.row)"
|
</el-link>
|
||||||
v-auth="'pu_plan.delete'"
|
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||||
>删除
|
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||||
|
删除
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -75,20 +70,32 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="成型7车间" name="7车间">
|
<el-tab-pane label="成型7车间" name="7车间">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table7"
|
||||||
:apiObj="apiUtask"
|
:apiObj="apiUtask"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="topHeight"
|
:height="topHeight"
|
||||||
:params="paramsUtask7"
|
:params="paramsUtask7"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="selection" width="40" />
|
||||||
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="型号" prop="number">
|
<el-table-column label="型号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="任务状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="任务量" prop="number">
|
<el-table-column label="任务量" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划量" prop="count">
|
<el-table-column label="计划量" prop="count">
|
||||||
|
@ -105,20 +112,18 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="要求描述" prop="count">
|
<el-table-column label="要求描述" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="120">
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-link type="primary" @click="table_show(scope.row)">
|
||||||
type="primary"
|
查看
|
||||||
@click="table_edit(scope.row)"
|
|
||||||
v-auth="'pu_plan.update'"
|
|
||||||
>编辑
|
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10"></el-divider>
|
||||||
<el-link
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
type="danger"
|
编辑
|
||||||
@click="table_del(scope.row)"
|
</el-link>
|
||||||
v-auth="'pu_plan.delete'"
|
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||||
>删除
|
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||||
|
删除
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -126,20 +131,32 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="成型10车间" name="10车间">
|
<el-tab-pane label="成型10车间" name="10车间">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table10"
|
||||||
:apiObj="apiUtask"
|
:apiObj="apiUtask"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="topHeight"
|
:height="topHeight"
|
||||||
:params="paramsUtask10"
|
:params="paramsUtask10"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="selection" width="40" />
|
||||||
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="型号" prop="number">
|
<el-table-column label="型号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="任务状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="任务量" prop="number">
|
<el-table-column label="任务量" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划量" prop="count">
|
<el-table-column label="计划量" prop="count">
|
||||||
|
@ -156,21 +173,17 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="要求描述" prop="count">
|
<el-table-column label="要求描述" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="120">
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-link type="primary" @click="table_show(scope.row)">
|
||||||
type="primary"
|
查看
|
||||||
@click="table_edit(scope.row)"
|
</el-link>
|
||||||
v-auth="'pu_plan.update'"
|
<el-divider direction="vertical" v-if="scope.row.state==10"></el-divider>
|
||||||
>
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
编辑
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||||
<el-link
|
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||||
type="danger"
|
|
||||||
@click="table_del(scope.row)"
|
|
||||||
v-auth="'pu_plan.delete'"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -224,7 +237,7 @@
|
||||||
<el-table-column v-for="item in columList" :label="item" :key="item">
|
<el-table-column v-for="item in columList" :label="item" :key="item">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div :class="bindClass(scope.row)">
|
<div :class="bindClass(scope.row)">
|
||||||
<div>{{ scope.row.count01 }}</div>
|
<div v-if="activeName=='10车间'">{{ scope.row.count01 }}</div>
|
||||||
<div>{{ scope.row.count02 }}</div>
|
<div>{{ scope.row.count02 }}</div>
|
||||||
<div>{{ scope.row.count03 }}</div>
|
<div>{{ scope.row.count03 }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -240,6 +253,57 @@
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
|
<el-drawer
|
||||||
|
title="任务详情"
|
||||||
|
v-model="visibleRecord"
|
||||||
|
:size="800"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="visibleRecord=false"
|
||||||
|
>
|
||||||
|
<div class="right-panel tabsHeader">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="paramsObj.start_date"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleDetailQuery"
|
||||||
|
>查询</el-button>
|
||||||
|
</div>
|
||||||
|
<el-container v-loading="isloading">
|
||||||
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
|
<scTable
|
||||||
|
ref="drawer_table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:params="paramsObj"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="工段" prop="mgroup_name" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料编号" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工作日期" prop="start_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" prop="state" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./mtask_form.vue";
|
import saveDialog from "./mtask_form.vue";
|
||||||
|
@ -254,38 +318,44 @@ export default {
|
||||||
save: false,
|
save: false,
|
||||||
},
|
},
|
||||||
apiUtask: this.$API.pm.utask.list,
|
apiUtask: this.$API.pm.utask.list,
|
||||||
paramsUtask7: { parent__isnull: true, mgroup__belong_dept__name: '7车间', material_out__is_hidden: true },
|
paramsUtask7: { belong_dept__name: '7车间' },
|
||||||
paramsUtask8: { parent__isnull: true, mgroup__belong_dept__name: '8车间', material_out__is_hidden: true },
|
paramsUtask8: { belong_dept__name: '8车间' },
|
||||||
paramsUtask10: { parent__isnull: true, mgroup__belong_dept__name: '10车间', material_out__is_hidden: true },
|
paramsUtask10: { belong_dept__name: '10车间' },
|
||||||
apiObj: this.$API.pm.mtask.list,
|
apiObj: null,
|
||||||
|
paramsObj:{utask:''},
|
||||||
query: {
|
query: {
|
||||||
page:1,
|
page:1,
|
||||||
page_size:20,
|
page_size:20,
|
||||||
date:''
|
date:''
|
||||||
},
|
},
|
||||||
|
utaskId:'',
|
||||||
|
isloading:false,
|
||||||
|
visibleRecord:false,
|
||||||
tableHeight:null,
|
tableHeight:null,
|
||||||
hideDo:true,
|
hideDo:true,
|
||||||
activeName:'10车间',
|
activeName:'8车间',
|
||||||
dataList:[
|
dataList:[
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
|
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
],
|
],
|
||||||
columList:['10.15','10.16','10.17'],
|
columList:['10.15','10.16','10.17'],
|
||||||
selection: [],
|
selection: [],
|
||||||
|
selectedIds:[],
|
||||||
state_: {
|
state_: {
|
||||||
10: '完好',
|
10: '创建中',
|
||||||
20: '限用',
|
14: '已分解',
|
||||||
30: '在修',
|
20: '已下达',
|
||||||
40: '禁用',
|
30: '生产中',
|
||||||
|
40: '已提交'
|
||||||
},
|
},
|
||||||
topHeight:null,
|
topHeight:null,
|
||||||
bottomHeight:null,
|
bottomHeight:null,
|
||||||
|
@ -307,7 +377,7 @@ export default {
|
||||||
this.query.date = [startDate,endDate];
|
this.query.date = [startDate,endDate];
|
||||||
let heights = document.getElementById('topContainer').clientHeight;
|
let heights = document.getElementById('topContainer').clientHeight;
|
||||||
console.log('heights',heights)
|
console.log('heights',heights)
|
||||||
this.topHeight = (heights-115)+'px';
|
this.topHeight = (heights-45)+'px';
|
||||||
this.bottomHeight = (heights-65)+'px';
|
this.bottomHeight = (heights-65)+'px';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -340,20 +410,14 @@ export default {
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//查看
|
|
||||||
table_show(row) {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open("show").setData(row);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
this.$confirm(`确定删除吗?`, "提示", {
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$API.pm.mtask.delete.req(row.id).then((res) => {
|
this.$API.pm.utask.delete.req(row.id).then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
|
this.$refs.table7.refresh();
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
@ -362,11 +426,9 @@ export default {
|
||||||
},
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
if (mode == "add") {
|
this.$refs.table7.refresh();
|
||||||
this.$refs.table.refresh();
|
this.$refs.table8.refresh();
|
||||||
} else if (mode == "edit") {
|
this.$refs.table10.refresh();
|
||||||
this.$refs.table.refresh();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
let startDate = this.query.date[0];
|
let startDate = this.query.date[0];
|
||||||
|
@ -394,6 +456,54 @@ export default {
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
|
handleSelectionChange(selection){
|
||||||
|
this.selectedIds = [];
|
||||||
|
selection.forEach(item => {
|
||||||
|
this.selectedIds.push(item.id)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//任务分解
|
||||||
|
utaskDepuse(){
|
||||||
|
let that = this;
|
||||||
|
if(that.selectedIds.length>0){
|
||||||
|
that.isloading = true;
|
||||||
|
that.$API.pm.utask.scheduemtasks.req({ids:that.selectedIds}).then(res=>{
|
||||||
|
that.$message.success('任务分解成功');
|
||||||
|
that.isloading = false;
|
||||||
|
that.$refs.table7.refresh();
|
||||||
|
that.$refs.table8.refresh();
|
||||||
|
that.$refs.table10.refresh();
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isloading = false;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$message.error('未选择任何任务')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
utaskAssgin(){
|
||||||
|
let that = this;
|
||||||
|
if(that.selectedIds.length>0){
|
||||||
|
that.isloading = true;
|
||||||
|
that.$API.pm.utask.assgin.req({ids:that.selectedIds}).then(res=>{
|
||||||
|
that.$message.success('下达任务成功');
|
||||||
|
that.isloading = false;
|
||||||
|
that.$refs.table7.refresh();
|
||||||
|
that.$refs.table8.refresh();
|
||||||
|
that.$refs.table10.refresh();
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isloading = false;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$message.error('未选择任何任务')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//查看
|
||||||
|
table_show(row) {
|
||||||
|
this.utaskId = row.id;
|
||||||
|
this.paramsObj.utask = row.id;
|
||||||
|
this.apiObj = this.$API.pm.mtask.list;
|
||||||
|
this.visibleRecord = true;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -415,4 +525,11 @@ export default {
|
||||||
.el-main.nopadding{
|
.el-main.nopadding{
|
||||||
padding:0 20px 0 20px
|
padding:0 20px 0 20px
|
||||||
}
|
}
|
||||||
|
.btnsContainer{
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
margin-top: 4px;
|
||||||
|
z-index: 100
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -3,26 +3,25 @@
|
||||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||||
<div class="right-panel btnsContainer" style=" ">
|
<div class="right-panel btnsContainer" style=" ">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||||
<el-button type="primary" @click="utaskAssgin">任务下达</el-button>
|
<el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务分解</el-button>
|
||||||
|
<el-button type="primary" @click="utaskAssgin" v-loading="isloading">任务下达</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs">
|
<el-tabs v-model="activeName" class="demo-tabs">
|
||||||
<el-tab-pane label="粗加工6车间" name="6车间">
|
<el-tab-pane label="粗加工6车间" name="6车间">
|
||||||
<scTable ref="table1" :apiObj="apiUtask" row-key="id" stripe :params="paramsUtask" :height="tableHeight" @selection-change="handleSelectionChange" hidePagination>
|
<scTable ref="table1" :apiObj="apiUtask" row-key="id" stripe :params="paramsUtask" :height="tableHeight" @selection-change="handleSelectionChange" hidePagination>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="40" />
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务状态" prop="state">
|
<el-table-column label="任务状态" prop="state">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state!==40" type="primary">
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
{{ mtaskStateOptions[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="success">
|
<el-tag v-else type="success">
|
||||||
{{ mtaskStateOptions[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span>
|
|
||||||
</template> -->
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务量" prop="count">
|
<el-table-column label="任务量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -34,17 +33,17 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完工时间" prop="end_date">
|
<el-table-column label="完工时间" prop="end_date">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="150">
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link type="primary" @click="table_show(scope.row)">
|
<el-link type="primary" @click="table_show(scope.row)">
|
||||||
查看
|
查看
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10"></el-divider>
|
||||||
<el-link type="primary" @click="table_edit(scope.row)">
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
编辑
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||||
<el-link type="danger" @click="table_del(scope.row)">
|
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||||
删除
|
删除
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -55,10 +54,10 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-main class="nopadding" style="position: relative;height: 50%;">
|
<el-main class="nopadding" style="position: relative;height: 50%;">
|
||||||
<div class="right-panel btnsContainer" v-if="activeNameSub == 'order'">
|
<div class="right-panel btnsContainer" v-if="activeNameSub == 'order'">
|
||||||
<el-button type="primary" @click="startPlan">排产</el-button>
|
<!-- <el-button type="primary" @click="startPlan">排产</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="订单排产" name="order">
|
<!-- <el-tab-pane label="订单排产" name="order">
|
||||||
<scTable ref="table2" :apiObj="apiOrderItem" row-key="id" stripe :height="tableHeight" :params="paramsOrderItem" @selection-change="selectionOrderItemChange" hidePagination>
|
<scTable ref="table2" :apiObj="apiOrderItem" row-key="id" stripe :height="tableHeight" :params="paramsOrderItem" @selection-change="selectionOrderItemChange" hidePagination>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="订单编号" prop="number">
|
<el-table-column label="订单编号" prop="number">
|
||||||
|
@ -84,7 +83,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
<el-tab-pane label="生产进度" name="rate">
|
<el-tab-pane label="生产进度" name="rate">
|
||||||
<GanttComponent class="left-container" :tasks="tasks"></GanttComponent>
|
<GanttComponent class="left-container" :tasks="tasks"></GanttComponent>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -165,15 +164,17 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料编号" prop="number">
|
<el-table-column label="物料编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="工作日期" prop="start_date">
|
<el-table-column label="工作日期" prop="start_date">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="state" show-overflow-tooltip>
|
<el-table-column label="状态" prop="state" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state!==40" type="primary">
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
{{ mtaskStateOptions[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="success">
|
<el-tag v-else type="success">
|
||||||
{{ mtaskStateOptions[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -193,11 +194,12 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mtaskStateOptions: {
|
state_: {
|
||||||
10: '创建中',
|
10: '创建中',
|
||||||
|
14: '已分解',
|
||||||
20: '已下达',
|
20: '已下达',
|
||||||
30: '进行中',
|
30: '生产中',
|
||||||
40: '已完成'
|
40: '已提交'
|
||||||
},
|
},
|
||||||
ganttHeight: '500px',
|
ganttHeight: '500px',
|
||||||
ganttLoading: false,
|
ganttLoading: false,
|
||||||
|
@ -208,6 +210,7 @@ export default {
|
||||||
orderitems:[],
|
orderitems:[],
|
||||||
start_date:'',
|
start_date:'',
|
||||||
end_date:'',
|
end_date:'',
|
||||||
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
start_date: [{required: true, message: "请选择计划开工日期", trigger: "blur"}],
|
start_date: [{required: true, message: "请选择计划开工日期", trigger: "blur"}],
|
||||||
|
@ -221,27 +224,22 @@ export default {
|
||||||
apiUtask: this.$API.pm.utask.list,
|
apiUtask: this.$API.pm.utask.list,
|
||||||
apiOrderItem: this.$API.sam.orderitem.list,
|
apiOrderItem: this.$API.sam.orderitem.list,
|
||||||
paramsOrderItem: { utask__isnull: true },
|
paramsOrderItem: { utask__isnull: true },
|
||||||
paramsUtask: { material__type: 10 },
|
paramsUtask: { belong_dept__name: '6车间' },
|
||||||
query: {
|
query: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
date: ''
|
date: ''
|
||||||
},
|
},
|
||||||
|
isloading:false,
|
||||||
visibleRecord:false,
|
visibleRecord:false,
|
||||||
isSaveing:false,
|
isSaveing:false,
|
||||||
tableHeight:null,
|
tableHeight:null,
|
||||||
activeName: '6车间',
|
activeName: '6车间',
|
||||||
activeNameSub: 'order',
|
activeNameSub: 'rate',
|
||||||
visible:false,
|
visible:false,
|
||||||
orderitemList:[],
|
orderitemList:[],
|
||||||
selectedIds:[],
|
selectedIds:[],
|
||||||
utaskDetail:[],
|
utaskDetail:[],
|
||||||
state_: {
|
|
||||||
10: '完好',
|
|
||||||
20: '限用',
|
|
||||||
30: '在修',
|
|
||||||
40: '禁用',
|
|
||||||
},
|
|
||||||
tasks: {
|
tasks: {
|
||||||
data: [
|
data: [
|
||||||
{number:'GZ20231012',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-12",id:'2023101800',duration: 2,progress: 1},
|
{number:'GZ20231012',model:'GB2',cate:'100*50*2',count:300,text: "一天任务",start_date: "2023-10-12",id:'2023101800',duration: 2,progress: 1},
|
||||||
|
@ -276,12 +274,32 @@ export default {
|
||||||
this.selectedIds.push(item.id)
|
this.selectedIds.push(item.id)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//任务分解
|
||||||
|
utaskDepuse(){
|
||||||
|
let that = this;
|
||||||
|
if(that.selectedIds.length>0){
|
||||||
|
that.isloading = true;
|
||||||
|
that.$API.pm.utask.scheduemtasks.req({ids:that.selectedIds}).then(res=>{
|
||||||
|
that.$message.success('任务分解成功');
|
||||||
|
that.isloading = false;
|
||||||
|
that.$refs.table1.refresh();
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isloading = false;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$message.error('未选择任何任务')
|
||||||
|
}
|
||||||
|
},
|
||||||
utaskAssgin(){
|
utaskAssgin(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.selectedIds.length>0){
|
if(that.selectedIds.length>0){
|
||||||
|
that.isloading = true;
|
||||||
that.$API.pm.utask.assgin.req({ids:that.selectedIds}).then(res=>{
|
that.$API.pm.utask.assgin.req({ids:that.selectedIds}).then(res=>{
|
||||||
that.$message.success('下达任务成功');
|
that.$message.success('下达任务成功');
|
||||||
that.ref.table1.refresh();
|
that.isloading = false;
|
||||||
|
that.$refs.table1.refresh();
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isloading = false;
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.$message.error('未选择任何任务')
|
this.$message.error('未选择任何任务')
|
||||||
|
@ -354,14 +372,10 @@ export default {
|
||||||
},
|
},
|
||||||
//查看
|
//查看
|
||||||
table_show(row) {
|
table_show(row) {
|
||||||
|
|
||||||
this.utaskId = row.id;
|
this.utaskId = row.id;
|
||||||
this.paramsObj.utask = row.id;
|
this.paramsObj.utask = row.id;
|
||||||
this.apiObj = this.$API.pm.mtask.list;
|
this.apiObj = this.$API.pm.mtask.list;
|
||||||
this.visibleRecord = true;
|
this.visibleRecord = true;
|
||||||
// this.$API.pm.mtask.list.req({utask:row.id}).then(re=>{
|
|
||||||
// this.utaskDetail = res;
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
handleDetailQuery(){
|
handleDetailQuery(){
|
||||||
this.$refs.drawer_table.refresh();
|
this.$refs.drawer_table.refresh();
|
||||||
|
@ -402,6 +416,7 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.form.orderitems = that.orderitemList;
|
that.form.orderitems = that.orderitemList;
|
||||||
|
that.form.belong_dept = '3423857962907983872';//6车间
|
||||||
console.log(that.form)
|
console.log(that.form)
|
||||||
that.$API.pm.utask.schedueutasks.req(that.form).then(res=>{
|
that.$API.pm.utask.schedueutasks.req(that.form).then(res=>{
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
|
|
|
@ -166,6 +166,15 @@ export default {
|
||||||
this.isSaveing = true;
|
this.isSaveing = true;
|
||||||
try {
|
try {
|
||||||
var res;
|
var res;
|
||||||
|
if(this.activeName=='6车间'){
|
||||||
|
this.form.belong_dept = '3423857962907983872';//6车间
|
||||||
|
}else if(this.activeName=='7车间'){
|
||||||
|
this.form.belong_dept = '3423858259797598208';//7车间
|
||||||
|
}else if(this.activeName=='8车间'){
|
||||||
|
this.form.belong_dept = '3423858687901908992';//8车间
|
||||||
|
}else if(this.activeName=='10车间'){
|
||||||
|
this.form.belong_dept = '3423858348557549568';//10车间
|
||||||
|
}
|
||||||
if (this.mode == "add") {
|
if (this.mode == "add") {
|
||||||
res = await this.$API.pm.utask.create.req(this.form);
|
res = await this.$API.pm.utask.create.req(this.form);
|
||||||
} else if (this.mode == "edit") {
|
} else if (this.mode == "edit") {
|
||||||
|
|
|
@ -80,9 +80,8 @@ export default {
|
||||||
stateOption: {
|
stateOption: {
|
||||||
10: '创建中',
|
10: '创建中',
|
||||||
20: '已提交',
|
20: '已提交',
|
||||||
30: '已排产',
|
30: '进行中',
|
||||||
40: '排产完成',
|
40: '已交付',
|
||||||
50: '已交付',
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
<span v-if="!scope.row.change">{{ scope.row.mgroup_name }}</span>
|
||||||
<el-select v-else v-model="scope.row.batch" placeholder="请选择">
|
<el-select v-else v-model="scope.row.batch" placeholder="请选择">
|
||||||
<el-option v-for="item in options" :key="item" :label="item" :value="item"></el-option>
|
<el-option v-for="item in processOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -120,6 +120,7 @@
|
||||||
related:[],
|
related:[],
|
||||||
userList:[],
|
userList:[],
|
||||||
formList: [],
|
formList: [],
|
||||||
|
processOptions:[],
|
||||||
recordId:'',
|
recordId:'',
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
@ -136,6 +137,7 @@
|
||||||
this.getBatchs();
|
this.getBatchs();
|
||||||
this.getFormList();
|
this.getFormList();
|
||||||
this.getUserList();
|
this.getUserList();
|
||||||
|
this.getProcess();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//显示
|
//显示
|
||||||
|
@ -171,6 +173,12 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//获取工序列表
|
||||||
|
getProcess(){
|
||||||
|
var res = this.$API.mtm.process.list.req({page:0}).then(res=>{
|
||||||
|
this.processOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
getBatchs(){
|
getBatchs(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -198,12 +206,6 @@
|
||||||
deleteRow(){
|
deleteRow(){
|
||||||
this.$refs.table.deleteRow(0)
|
this.$refs.table.deleteRow(0)
|
||||||
},
|
},
|
||||||
|
|
||||||
getList(){
|
|
||||||
this.$API.mtm.material.list.req({page:0}).then(res=>{
|
|
||||||
this.options = res;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getReceptionist(data) {
|
getReceptionist(data) {
|
||||||
// 子组件调用父组件的方法并传参
|
// 子组件调用父组件的方法并传参
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="12" style="border-right: 1px solid #eeeeee;position: relative;">
|
<el-col :span="12" style="border-right: 1px solid #eeeeee;position: relative;">
|
||||||
<div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;z-index:100">
|
<div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;z-index:100">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
|
||||||
<el-button type="primary" @click="add">任务下达</el-button>
|
|
||||||
<el-button type="primary" @click="handleQuery" >导出</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="混料工序" name="8车间">
|
<el-tab-pane label="混料工序" name="8车间">
|
||||||
|
@ -16,7 +14,9 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
:params="query"
|
:params="params8"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
|
@ -44,14 +44,23 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
:params="query"
|
:params="params7"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
|
@row-click="rowClick"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.name }}</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="型号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" prop="number">
|
<el-table-column label="型号规格" prop="">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.specification }}</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划量" prop="count">
|
<el-table-column label="计划量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -63,6 +72,16 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完成量" prop="count">
|
<el-table-column label="完成量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="10车间" name="10车间">
|
<el-tab-pane label="10车间" name="10车间">
|
||||||
|
@ -72,7 +91,9 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
:params="query"
|
:params="params10"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
|
@ -99,17 +120,18 @@
|
||||||
<el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;">
|
<el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="8" :sm="12" :xs="24">
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
<el-form-item class="infoForm" label="产品名称:"></el-form-item>
|
<el-form-item class="infoForm" label="产品名称:">
|
||||||
</el-col>
|
<span v-if="choseData.material_out_">{{ choseData.material_out_.name }}</span>
|
||||||
<el-col :md="8" :sm="12" :xs="24">
|
|
||||||
<el-form-item class="infoForm" label="产品型号:"></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="8" :sm="12" :xs="24">
|
|
||||||
<el-form-item class="infoForm" label="计划数量:">
|
|
||||||
<span></span>
|
|
||||||
<el-input></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item class="infoForm" label="产品型号:">
|
||||||
|
<span v-if="choseData.material_out_">{{ choseData.material_out_.number }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
|
<el-form-item class="infoForm" label="计划数量:">{{ choseData.count }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="margin-top: 10px;">
|
<div style="margin-top: 10px;">
|
||||||
|
@ -138,7 +160,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="领料数量" prop="count">
|
<el-table-column label="领料数量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="100">
|
<el-table-column label="操作" fixed="right" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -303,13 +325,20 @@ export default {
|
||||||
},
|
},
|
||||||
sumLog:false,
|
sumLog:false,
|
||||||
// apiObj: this.$API.pm.mtask.list,
|
// apiObj: this.$API.pm.mtask.list,
|
||||||
|
params7:{
|
||||||
|
belong_dept_name:'7车间',
|
||||||
|
date:'2023-10-24'
|
||||||
|
},
|
||||||
|
params8:{
|
||||||
|
belong_dept_name:'8车间',
|
||||||
|
date:'2023-10-24'
|
||||||
|
},
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
query: {
|
params10: {
|
||||||
page:1,
|
|
||||||
page_size:20,
|
|
||||||
belong_dept_name:'10车间',
|
belong_dept_name:'10车间',
|
||||||
date:'2023-10-20'
|
date:'2023-10-20'
|
||||||
},
|
},
|
||||||
|
|
||||||
flogs:[],
|
flogs:[],
|
||||||
flogsData: [{id: 1, name: 'John Doe', dob: new Date(1970,1,1)}],
|
flogsData: [{id: 1, name: 'John Doe', dob: new Date(1970,1,1)}],
|
||||||
columns : [
|
columns : [
|
||||||
|
@ -317,14 +346,15 @@ export default {
|
||||||
{ header: 'Name', key: 'name', wch: 15 },
|
{ header: 'Name', key: 'name', wch: 15 },
|
||||||
{ header: 'D.O.B.', key: 'dob', width: 32 }
|
{ header: 'D.O.B.', key: 'dob', width: 32 }
|
||||||
],
|
],
|
||||||
activeName:'10车间',
|
activeName:'8车间',
|
||||||
selection: [],
|
selection: [],
|
||||||
state_: {
|
state_: {
|
||||||
10: '完好',
|
10: '创建中',
|
||||||
20: '限用',
|
20: '已下达',
|
||||||
30: '在修',
|
30: '生产中',
|
||||||
40: '禁用',
|
40: '已提交',
|
||||||
},
|
},
|
||||||
|
choseData:{},
|
||||||
mtask:'',
|
mtask:'',
|
||||||
rightHeight:null,
|
rightHeight:null,
|
||||||
tableHeight:null,
|
tableHeight:null,
|
||||||
|
@ -351,7 +381,13 @@ export default {
|
||||||
console.log('heights',heights)
|
console.log('heights',heights)
|
||||||
this.tableHeight = (heights-50)+'px';
|
this.tableHeight = (heights-50)+'px';
|
||||||
let rightHeight = heights-100;
|
let rightHeight = heights-100;
|
||||||
this.rightHeight = rightHeight/2+'px'
|
this.rightHeight = rightHeight/2+'px';
|
||||||
|
let NowDate = new Date();
|
||||||
|
let month = NowDate.getMonth()>8?NowDate.getMonth()+1:'0'+(NowDate.getMonth()+1)
|
||||||
|
this.params7.date = NowDate.getFullYear()+'-'+(NowDate.getMonth()+1)+'-'+NowDate.getDate();
|
||||||
|
this.params8.date = NowDate.getFullYear()+'-'+(NowDate.getMonth()+1)+'-'+NowDate.getDate();
|
||||||
|
this.params10.date = NowDate.getFullYear()+'-'+(NowDate.getMonth()+1)+'-'+NowDate.getDate();
|
||||||
|
this.apiObj = this.$API.pm.mtask.daylist;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取甘特图数据
|
//获取甘特图数据
|
||||||
|
@ -427,6 +463,9 @@ export default {
|
||||||
sum(){
|
sum(){
|
||||||
this.sumLog = true;
|
this.sumLog = true;
|
||||||
},
|
},
|
||||||
|
rowClick(row){
|
||||||
|
this.choseData = row
|
||||||
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
if (mode == "add") {
|
if (mode == "add") {
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.name }}</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品型号" prop="number">
|
<el-table-column label="产品型号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -38,9 +41,17 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划日期" prop="count">
|
<el-table-column label="计划日期" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="count">
|
<el-table-column label="状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.state!==40" type="primary">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ state_[scope.row.state] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="120">
|
<el-table-column label="操作" fixed="right" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -157,10 +168,10 @@ export default {
|
||||||
wMaterial:[],//车间物料
|
wMaterial:[],//车间物料
|
||||||
processList:[],//工序进度
|
processList:[],//工序进度
|
||||||
state_: {
|
state_: {
|
||||||
10: '完好',
|
10: '创建中',
|
||||||
20: '限用',
|
20: '已下达',
|
||||||
30: '在修',
|
30: '生产中',
|
||||||
40: '禁用',
|
40: '已提交',
|
||||||
},
|
},
|
||||||
hideDo:true,
|
hideDo:true,
|
||||||
topHeight:null,
|
topHeight:null,
|
||||||
|
|
Loading…
Reference in New Issue