Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
f41e7a8a67
|
@ -0,0 +1,152 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="titleMap[mode]"
|
||||||
|
v-model="visible"
|
||||||
|
width="1000px"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="产品规格" prop="material">
|
||||||
|
<el-select
|
||||||
|
v-model="form.cate"
|
||||||
|
placeholder="产品规格"
|
||||||
|
clearable
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品班次" prop="material">
|
||||||
|
<el-select
|
||||||
|
v-model="form.shift"
|
||||||
|
placeholder="产品班次"
|
||||||
|
clearable
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOptions"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="合格数量" width="100">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_use"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0" step="1"
|
||||||
|
:step-strictly="true"
|
||||||
|
style="width:100%"
|
||||||
|
placeholder="请输入合格数量">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="type" label="成型人">
|
||||||
|
<span style="display:flex">
|
||||||
|
<el-input readonly v-model="handle_name"></el-input>
|
||||||
|
<ehsUserSelect :multiple="false" @submit="getReceptionist"/>
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="type" label="带班人">
|
||||||
|
<span style="display:flex">
|
||||||
|
<el-input readonly v-model="handle_name"></el-input>
|
||||||
|
<ehsUserSelect :multiple="false" @submit="getReceptionist"/>
|
||||||
|
</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-footer>
|
||||||
|
<el-button @click="resetForm">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { index } from 'd3';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
props:{
|
||||||
|
mtask: { type: String, default: '' },
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
mode: "add",
|
||||||
|
titleMap: {
|
||||||
|
add: "新增记录",
|
||||||
|
edit: "编辑记录",
|
||||||
|
show: "查看记录",
|
||||||
|
},
|
||||||
|
form:{},
|
||||||
|
options:[],
|
||||||
|
cateOptions:[],
|
||||||
|
shiftOptions:['白班','夜班'],
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
setFiltersVisible: false,
|
||||||
|
handle_name:'',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getReceptionist(data) {
|
||||||
|
this.form.handle_user=data.id;
|
||||||
|
this.handle_name=data.name
|
||||||
|
},
|
||||||
|
//显示
|
||||||
|
open(mode = "add") {
|
||||||
|
this.mode = mode;
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
getList(){
|
||||||
|
this.$API.mtm.material.list.req({page:0}).then(res=>{
|
||||||
|
this.options = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//提交
|
||||||
|
submit() {
|
||||||
|
this.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.isSaveing = true;
|
||||||
|
try {
|
||||||
|
var res;
|
||||||
|
this.form.mtask = this.mtask;
|
||||||
|
if (this.mode == "add") {
|
||||||
|
res = await this.$API.pum.planitem.create.req(this.form);
|
||||||
|
} else if (this.mode == "edit") {
|
||||||
|
res = await this.$API.pum.planitem.update.req(this.form.id,this.form);
|
||||||
|
}
|
||||||
|
this.isSaveing = false;
|
||||||
|
this.$emit("success", this.form, this.mode);
|
||||||
|
this.visible = false;
|
||||||
|
this.$message.success("操作成功");
|
||||||
|
} catch (err) {
|
||||||
|
//可以处理校验错误
|
||||||
|
this.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container style="flex-direction: column">
|
<el-container style="flex-direction: column">
|
||||||
<el-main id="topContainer" class="nopadding" style="position: relative;height: 50%;margin-bottom: 10px;">
|
<el-main id="topContainer" class="nopadding" style="position: relative;height: 50%;margin-bottom: 10px;">
|
||||||
<div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
<el-row :gutter="10">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">任务下达</el-button>
|
<el-col :span="10" style="border-right: 1px solid #eeeeee;position: relative;">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" >导出</el-button>
|
<div class="right-panel" style=" display: inline-block;position: absolute;right: 20px;margin-top: 4px;">
|
||||||
</div>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-button type="primary" icon="el-icon-plus" @click="add">任务下达</el-button>
|
||||||
<el-tab-pane label="粗加工6车间" name="first">
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery" >导出</el-button>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="10车间" name="first">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
|
@ -17,92 +20,112 @@
|
||||||
:params="query"
|
:params="query"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||||
</el-table-column>
|
|
||||||
<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="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">
|
||||||
</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="start_date">
|
<el-table-column label="开始时间" prop="start_date">
|
||||||
</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="完成量" prop="count">
|
<el-table-column label="完成量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="120">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-link
|
|
||||||
type="primary"
|
|
||||||
@click="table_edit(scope.row)"
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</el-link>
|
|
||||||
<el-divider direction="vertical"></el-divider>
|
|
||||||
<el-link
|
|
||||||
type="danger"
|
|
||||||
@click="table_del(scope.row)"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-main>
|
</el-col>
|
||||||
<el-main class="nopadding" style="position: relative;height: 50%;">
|
<el-col :span="14">
|
||||||
<div class="right-panel" v-if="activeNameSub=='order'" style="display: inline-block;position: absolute;right: 20px;margin-top: 4px;">
|
<el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;">
|
||||||
<el-button type="primary" icon="el-icon-plus">排产</el-button>
|
<el-row>
|
||||||
<el-button type="primary" icon="el-icon-plus">合并任务</el-button>
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
</div>
|
<el-form-item class="infoForm" label="产品名称:"></el-form-item>
|
||||||
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
|
</el-col>
|
||||||
<el-tab-pane label="订单排产" name="order">
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
<scTable
|
<el-form-item class="infoForm" label="产品型号:"></el-form-item>
|
||||||
ref="table"
|
</el-col>
|
||||||
:apiObj="apiObj"
|
<el-col :md="8" :sm="12" :xs="24">
|
||||||
row-key="id"
|
<el-form-item class="infoForm" label="计划数量:">
|
||||||
stripe
|
<span></span>
|
||||||
:height="tableHeight"
|
<el-input></el-input>
|
||||||
:params="query"
|
</el-form-item>
|
||||||
>
|
</el-col>
|
||||||
<el-table-column type="index" width="50"/>
|
</el-row>
|
||||||
<el-table-column label="订单编号" prop="number">
|
</el-form>
|
||||||
</el-table-column>
|
<div style="margin-top: 10px;">
|
||||||
<el-table-column label="合同编号" prop="material" show-overflow-tooltip>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||||
</el-table-column>
|
<el-button type="primary" @click="add">合计</el-button>
|
||||||
<el-table-column label="合同名称" prop="number">
|
</div>
|
||||||
</el-table-column>
|
<scTable
|
||||||
<el-table-column label="产品名称" prop="number">
|
ref="table"
|
||||||
</el-table-column>
|
:data="flogs"
|
||||||
<el-table-column label="型号" prop="count">
|
row-key="id"
|
||||||
</el-table-column>
|
stripe
|
||||||
<el-table-column label="规格" prop="count">
|
:height="tableHeight"
|
||||||
</el-table-column>
|
:params="query"
|
||||||
<el-table-column label="计划量" prop="count">
|
>
|
||||||
</el-table-column>
|
<el-table-column type="index" width="40"/>
|
||||||
<el-table-column label="交货时间" prop="end_date">
|
<el-table-column type="selection" width="40"/>
|
||||||
</el-table-column>
|
<el-table-column label="产品编号" prop="material">
|
||||||
</scTable>
|
</el-table-column>
|
||||||
</el-tab-pane>
|
<el-table-column label="产品名称" prop="number">
|
||||||
<el-tab-pane label="生产进度" name="rate">
|
</el-table-column>
|
||||||
<GanttComponent class="left-container" :tasks="tasks"></GanttComponent>
|
<el-table-column label="型号" prop="number">
|
||||||
</el-tab-pane>
|
</el-table-column>
|
||||||
</el-tabs>
|
<el-table-column label="规格" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="领料数量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="left" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="table_edit(scope.row)"
|
||||||
|
v-if="scope.row.status==10"
|
||||||
|
v-auth="'equipment.update'"
|
||||||
|
>编辑
|
||||||
|
</el-link>
|
||||||
|
<!-- 提交后变查看 -->
|
||||||
|
<el-link
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
@click="table_edit(scope.row)"
|
||||||
|
v-auth="'equipment.update'"
|
||||||
|
>查看
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="table_edit(scope.row)"
|
||||||
|
>删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-main>
|
</el-main>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
:mtask = "mtask"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
></save-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import saveDialog from "./task2flog_form.vue";
|
||||||
import GanttComponent from '@/components/GanttComponent.vue';
|
import GanttComponent from '@/components/GanttComponent.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "rparty",
|
name: "rparty",
|
||||||
components: {
|
components: {
|
||||||
GanttComponent
|
GanttComponent,saveDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -133,6 +156,7 @@ export default {
|
||||||
page_size:20,
|
page_size:20,
|
||||||
date:''
|
date:''
|
||||||
},
|
},
|
||||||
|
flogs:[],
|
||||||
activeName:'first',
|
activeName:'first',
|
||||||
activeNameSub:'order',
|
activeNameSub:'order',
|
||||||
selection: [],
|
selection: [],
|
||||||
|
@ -142,6 +166,8 @@ export default {
|
||||||
30: '在修',
|
30: '在修',
|
||||||
40: '禁用',
|
40: '禁用',
|
||||||
},
|
},
|
||||||
|
mtask:'',
|
||||||
|
rightHeight:null,
|
||||||
tableHeight:null
|
tableHeight:null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -153,6 +179,7 @@ export default {
|
||||||
let heights = document.getElementById('topContainer').clientHeight;
|
let heights = document.getElementById('topContainer').clientHeight;
|
||||||
console.log('heights',heights)
|
console.log('heights',heights)
|
||||||
this.tableHeight = (heights-50)+'px';
|
this.tableHeight = (heights-50)+'px';
|
||||||
|
this.rightHeight = (heights-80)+'px';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取甘特图数据
|
//获取甘特图数据
|
||||||
|
|
Loading…
Reference in New Issue