feat: mgroup增加排班规则字段

This commit is contained in:
caoqianming 2023-11-23 16:07:48 +08:00
parent dd2fc9a455
commit 5d8621cac0
15 changed files with 2746 additions and 3575 deletions

View File

@ -205,6 +205,7 @@ export default {
},
//班次
shift: {
list: {
name: "班次列表",
req: async function(data){
return await http.get(
@ -212,6 +213,8 @@ export default {
data
);
}
}
},
//班组
team: {

View File

@ -3,65 +3,21 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="开始时间" style=" width: 120px" />
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="50" />
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
@ -97,21 +53,16 @@
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
<el-button type="danger" @click="close">
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
<el-icon class="el-icon--left">
<CircleCloseFilled />
</el-icon>
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
<el-main class="nopadding">
@ -214,7 +165,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -274,25 +225,31 @@
#numTable {
margin-left: 37px;
}
#numTable td {
height: 32px;
padding-left: 5px;
}
.numCell {
width: 80px;
}
.numCell.numCell_last {
width: 100px;
}
.searchHead {
display: flex
}
.middleText {
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn {
margin-left: 5px;
}

View File

@ -3,65 +3,21 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="开始时间" style=" width: 120px" />
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="50" />
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
<el-table-column label="开始时间" prop="start_time">
@ -97,21 +53,16 @@
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
<el-button type="danger" @click="close">
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
<el-icon class="el-icon--left">
<CircleCloseFilled />
</el-icon>
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
<el-main class="nopadding">
@ -154,7 +105,8 @@
<td class="numCell" v-if="reportItem.入磨熟料_立升重_rate_pass">{{ reportItem.入磨熟料_立升重_rate_pass * 100 }}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">熟料f-CaO合格率%</td>
<td class="numCell" v-if="reportItem['入磨熟料_f-CaO_rate_pass']">{{reportItem['入磨熟料_f-CaO_rate_pass']*100}}</td>
<td class="numCell" v-if="reportItem['入磨熟料_f-CaO_rate_pass']">{{ reportItem['入磨熟料_f-CaO_rate_pass'] * 100 }}
</td>
<td class="numCell" v-else>0</td>
</tr>
<tr>
@ -237,7 +189,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -297,26 +249,32 @@
#numTable {
margin-left: 37px;
}
#numTable td {
height: 32px;
padding-left: 5px;
}
.numCell {
width: 80px;
text-align: center;
}
.numCell.numCell_last {
width: 100px;
}
.searchHead {
display: flex
}
.middleText {
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn {
margin-left: 5px;
}

View File

@ -3,65 +3,21 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="开始时间" style=" width: 120px" />
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="50" />
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
<el-table-column label="开始时间" prop="start_time">
@ -98,21 +54,16 @@
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
<el-button type="danger" @click="close">
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
<el-icon class="el-icon--left">
<CircleCloseFilled />
</el-icon>
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
<el-main class="nopadding">
@ -177,7 +128,6 @@
</el-main>
</el-drawer>
</el-container>
</template>
<script>
export default {
@ -217,7 +167,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -276,25 +226,31 @@
#numTable {
margin-left: 37px;
}
#numTable td {
height: 32px;
padding-left: 5px;
}
.numCell {
width: 80px;
}
.numCell.numCell_last {
width: 100px;
}
.searchHead {
display: flex
}
.middleText {
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn {
margin-left: 5px;
}

View File

@ -3,65 +3,21 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="开始时间" style=" width: 120px" />
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="50" />
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
<el-table-column label="开始时间" prop="start_time">
@ -98,21 +54,16 @@
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
<el-button type="danger" @click="close">
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
<el-icon class="el-icon--left">
<CircleCloseFilled />
</el-icon>
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
<el-main class="nopadding">
@ -159,7 +110,6 @@
</el-main>
</el-drawer>
</el-container>
</template>
<script>
export default {
@ -195,7 +145,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -255,25 +205,31 @@
#numTable {
margin-left: 37px;
}
#numTable td {
height: 32px;
padding-left: 5px;
}
.numCell {
width: 80px;
}
.numCell.numCell_last {
width: 100px;
}
.searchHead {
display: flex
}
.middleText {
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn {
margin-left: 5px;
}

View File

@ -3,65 +3,21 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="开始时间" style=" width: 120px" />
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="50" />
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
@ -96,21 +52,16 @@
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
<el-button type="danger" @click="close">
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
<el-icon class="el-icon--left">
<CircleCloseFilled />
</el-icon>
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
<el-main class="nopadding">
@ -266,7 +217,7 @@ import otherDialog from "./other_form.vue";
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -395,25 +346,31 @@ import otherDialog from "./other_form.vue";
#numTable {
margin-left: 37px;
}
#numTable td {
height: 32px;
padding-left: 5px;
}
.numCell {
width: 80px;
}
.numCell.numCell_last {
width: 100px;
}
.searchHead {
display: flex
}
.middleText {
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn {
margin-left: 5px;
}

View File

@ -1,20 +1,8 @@
<template>
<el-dialog
:title="titleMap[mode]"
v-model="visible"
:size="1000"
destroy-on-close
@closed="$emit('closed')"
>
<el-dialog :title="titleMap[mode]" v-model="visible" :size="1000" destroy-on-close @closed="$emit('closed')">
<el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px">
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rule1"
>
<el-form ref="dialogForm" :model="form" label-width="100px" label-position="right" :rules="rule1">
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="关联工段" prop="mgroup">
@ -28,43 +16,20 @@
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="开始时间" prop="start_time">
<el-date-picker
disabled
v-model="form.start_time"
type="datetime"
format="YYYY-MM-DD HH:mm"
placeholder="开始时间"
style="width: 100%;"
/>
<el-date-picker disabled v-model="form.start_time" type="datetime" format="YYYY-MM-DD HH:mm"
placeholder="开始时间" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="结束时间" prop="end_time">
<el-date-picker
disabled
v-model="form.end_time"
type="datetime"
format="YYYY-MM-DD HH:mm"
placeholder="结束时间"
style="width: 100%;"
/>
<el-date-picker disabled v-model="form.end_time" type="datetime" format="YYYY-MM-DD HH:mm"
placeholder="结束时间" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="当班班组" prop="team">
<el-select
v-model="form.team"
placeholder="当班班组"
clearable
style="width: 100%;"
@change="teamChange"
>
<el-option
v-for="item in teamOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.team" placeholder="当班班组" clearable style="width: 100%;" @change="teamChange">
<el-option v-for="item in teamOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -80,12 +45,7 @@
</el-col>
<el-col>
<el-form-item label="生产情况记录">
<el-input
type="textarea"
:rows="4"
v-model="form.note"
placeholder="生产情况记录"
/>
<el-input type="textarea" :rows="4" v-model="form.note" placeholder="生产情况记录" />
</el-form-item>
</el-col>
</el-row>
@ -162,7 +122,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.shiftOptions = res;
})
},
@ -220,6 +180,5 @@
},
};
</script>
<style>
</style>
<style></style>

View File

@ -1,20 +1,8 @@
<template>
<el-dialog
:title="titleMap[mode]"
v-model="visible"
:size="1000"
destroy-on-close
@closed="$emit('closed')"
>
<el-dialog :title="titleMap[mode]" v-model="visible" :size="1000" destroy-on-close @closed="$emit('closed')">
<el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px">
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rules"
>
<el-form ref="dialogForm" :model="form" label-width="100px" label-position="right" :rules="rules">
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="关联工段" prop="mgroup">
@ -48,18 +36,14 @@
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="检测时间" prop="time">
<el-date-picker
v-model="form.time"
type="datetime"
value-format="YYYY-MM-DD HH:mm"
format="YYYY-MM-DD HH:mm"
placeholder="检测时间"
/>
<el-date-picker v-model="form.time" type="datetime" value-format="YYYY-MM-DD HH:mm"
format="YYYY-MM-DD HH:mm" placeholder="检测时间" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" class="formUnitWrap">
<el-form-item label="水耗统计" prop="val">
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计" style="width: 100%;"></el-input-number>
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计"
style="width: 100%;"></el-input-number>
</el-form-item>
<span class="formUnit">(t)</span>
</el-col>
@ -114,7 +98,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.shiftOptions = res;
})
},
@ -182,6 +166,7 @@
right: -17px;
top: 7px;
}
.formUnitWrap {
position: relative;
}

View File

@ -3,65 +3,21 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="开始时间" style=" width: 120px" />
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
<el-table-column type="index" width="50" />
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
@ -94,21 +50,16 @@
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
<el-button type="danger" @click="close">
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
<el-icon class="el-icon--left">
<CircleCloseFilled />
</el-icon>
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
<el-main class="nopadding">
@ -191,7 +142,7 @@
})
},
getShfit() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -251,25 +202,31 @@
#numTable {
margin-left: 37px;
}
#numTable td {
height: 32px;
padding-left: 5px;
}
.numCell {
width: 80px;
}
.numCell.numCell_last {
width: 100px;
}
.searchHead {
display: flex
}
.middleText {
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn {
margin-left: 5px;
}

View File

@ -1,32 +1,13 @@
<template>
<el-drawer
:title="titleMap[mode]"
v-model="visible"
:size="1000"
destroy-on-close
@closed="closeDrawer"
>
<el-drawer :title="titleMap[mode]" v-model="visible" :size="1000" destroy-on-close @closed="closeDrawer">
<el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px">
<el-form
ref="dialogForm"
:model="form"
:rules="rules"
:disabled="mode==='show'"
label-width="120px"
>
<el-form ref="dialogForm" :model="form" :rules="rules" :disabled="mode === 'show'" label-width="120px">
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="所属部门">
<el-select
v-model="belongDept"
clearable
style="width:100%"
@change="getTeam"
>
<el-option v-for="item in deptOptions"
:key="item.id"
:label="item.name"
<el-select v-model="belongDept" clearable style="width:100%" @change="getTeam">
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name"
:value="item.id">
</el-option>
</el-select>
@ -34,49 +15,25 @@
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班次">
<el-select
v-model="form.shift"
placeholder="班次"
clearable
style="width:100%"
>
<el-option
v-for="item in shiftOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.shift" placeholder="班次" clearable style="width:100%">
<el-option v-for="item in shiftOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班组">
<el-select
v-model="form.team"
placeholder="班组"
clearable
style="width:100%"
@change="getuser"
>
<el-option
v-for="item in teamOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.team" placeholder="班组" clearable style="width:100%"
@change="getuser">
<el-option v-for="item in teamOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="工作日期">
<el-date-picker
v-model="form.work_date"
type="date"
placeholder="工作日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width:100%"
/>
<el-date-picker v-model="form.work_date" type="date" placeholder="工作日期" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" style="width:100%" />
</el-form-item>
</el-col>
<!-- <el-col :md="12" :sm="24">
@ -86,36 +43,21 @@
</el-col> -->
</el-row>
</el-form>
<sc-form-table
v-model="userList"
:addTemplate="addTemplate"
placeholder="暂无数据"
>
<sc-form-table v-model="userList" :addTemplate="addTemplate" placeholder="暂无数据">
<el-table-column prop="user_name" label="姓名"></el-table-column>
<el-table-column prop="mgroup_name" label="工段"></el-table-column>
<el-table-column prop="post_name" label="岗位"></el-table-column>
<el-table-column prop="type" label="到岗状态">
<template #default="scope">
<el-select
v-model="scope.row.state"
filterable
placeholder="到岗状态"
>
<el-option
v-for="item in stateOptions"
:key="item.id"
:label="item.label"
:value="item.id"
></el-option>
<el-select v-model="scope.row.state" filterable placeholder="到岗状态">
<el-option v-for="item in stateOptions" :key="item.id" :label="item.label"
:value="item.id"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" label="备注">
<template #default="scope">
<el-input
v-model="scope.row.note"
placeholder="请输入内容"
></el-input>
<el-input v-model="scope.row.note" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
<!-- <el-table-column prop="open" label="操作" width="80" align="center">
@ -188,7 +130,7 @@
});
this.deptOptions = data;
});
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.shiftOptions = res;
})
},
@ -286,5 +228,4 @@
};
</script>
<style>
</style>
<style></style>

View File

@ -19,6 +19,13 @@
</template>
</el-table-column>
<el-table-column label="所属部门" prop="belong_dept_name" min-width="150"></el-table-column>
<el-table-column label="班次规则" prop="shift_rule" min-width="80"></el-table-column>
<el-table-column label="能源监测" prop="need_enm" min-width="80">
<template #default="scope">
<span v-if="scope.row.need_enm"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="排序" prop="sort" min-width="80"></el-table-column>
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180">
@ -36,11 +43,7 @@
</scTable>
</el-main>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false">
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save = false">
</save-dialog>
</template>
<script>

View File

@ -12,11 +12,19 @@
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="能源监测" prop="need_enm">
<el-switch v-model="form.need_enm"></el-switch>
</el-form-item>
<el-form-item label="所属部门">
<el-select v-model="form.belong_dept" placeholder="所属部门" clearable style="width: 100%;">
<el-option v-for="item in group" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="排班规则">
<el-select v-model="form.shift_rule" 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="排序">
<el-input-number v-model="form.sort" :min="1" />
</el-form-item>
@ -32,13 +40,14 @@
<el-table-column prop="type" label="输出物料" min-width="120" align="center">
<template #default="scope">
<el-select v-model="scope.row.material_out" filterable style="width: 100%">
<el-option v-for="item in materials" :key="item.id" :label="item.name" :value="item.id"></el-option>
<el-option v-for="item in materials" :key="item" :label="item" :value="item"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="type" label="操作" min-width="80" align="center">
<template #default="scope">
<el-button type="primary" v-if="scope.row.isedit" @click="submitForm(scope.row,scope.$index)">确定</el-button>
<el-button type="primary" v-if="scope.row.isedit"
@click="submitForm(scope.row, scope.$index)">确定</el-button>
<el-button type="warning" v-else @click="editForm(scope.row, scope.$index)">编辑</el-button>
<el-button type="danger" @click="delForm(scope.row, scope.$index)">删除</el-button>
</template>
@ -74,6 +83,7 @@ export default {
},
//
form: {
shift_rule: ''
},
//
rules: {
@ -83,6 +93,7 @@ export default {
},
visible: false,
isSaveing: false,
shiftOptions: [],
options: [],
group: [],
routes: [],
@ -93,6 +104,7 @@ export default {
};
},
mounted() {
this.getShifts();
this.getGroup();//
this.getProcess();//
this.getMaterial();//
@ -110,6 +122,17 @@ export default {
this.options = res;
});
},
getShifts() {
let shiftList = []
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
for (var i = 0; i < res.length; i++) {
if (shiftList.indexOf(res[i].rule) == -1) {
shiftList.push(res[i].rule)
}
}
this.shiftOptions = shiftList;
});
},
getMaterial() {
this.$API.mtm.material.list.req({ page: 0, is_hidden: false, type__in: '10,20' }).then(res => {
this.materials = res;
@ -156,9 +179,6 @@ export default {
let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
if(this.mode){
}else{
that.form.cate = 'photon';
that.form.need_enm = false;
that.isSaveing = true;
@ -178,7 +198,6 @@ export default {
})
}
}
}
});
},
submitForm(row, index) {

View File

@ -3,91 +3,26 @@
<div class="app-container">
<el-header>
<div class="left-panel">
<el-select
v-model="query.mgroup"
placeholder="工段"
clearable
@change="mgroupChange"
class="headerSearch"
>
<el-option
v-for="item in mgroupOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.mgroup" placeholder="工段" clearable @change="mgroupChange" class="headerSearch">
<el-option v-for="item in mgroupOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.type"
placeholder="查询类型"
clearable
class="headerSearch"
@change="typeCange"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.type" placeholder="查询类型" clearable class="headerSearch" @change="typeCange">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-date-picker
v-model="query.day"
type="date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
placeholder="日"
class="headerSearch"
v-if="query.type==0"
/>
<el-date-picker v-model="query.day" type="date" value-format="YYYY-MM-DD" format="YYYY-MM-DD"
placeholder="日" class="headerSearch" v-if="query.type == 0" />
<!-- 选择班次 -->
<el-select
v-if="query.type==0"
v-model="query.shift"
placeholder="班次"
clearable
class="headerSearch"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-if="query.type == 0" v-model="query.shift" placeholder="班次" clearable class="headerSearch">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-date-picker
v-model="query.month"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="月份"
class="headerSearch"
v-if="query.type==1"
/>
<el-date-picker
v-model="query.year"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="年份"
class="headerSearch"
v-if="query.type==2"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="getTableData"
></el-button>
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
<el-date-picker v-model="query.month" type="month" value-format="YYYY-MM" format="YYYY-MM" placeholder="月份"
class="headerSearch" v-if="query.type == 1" />
<el-date-picker v-model="query.year" type="year" value-format="YYYY" format="YYYY" placeholder="年份"
class="headerSearch" v-if="query.type == 2" />
<el-button type="primary" icon="el-icon-search" @click="getTableData"></el-button>
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
<el-button type="primary" @click="handlePrint">打印
</el-button>
</div>
</el-header>
@ -203,7 +138,7 @@
},
//
getShift() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},
@ -333,5 +268,4 @@
width: 100%;
overflow-x: scroll;
}
</style>

View File

@ -4,51 +4,17 @@
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">质量检验</div>
<el-date-picker
v-model="query.start_time__gte"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
placeholder="开始时间"
/>
<el-date-picker
v-model="query.end_time__day"
type="date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
placeholder="结束时间"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-date-picker v-model="query.start_time__gte" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss" placeholder="开始时间" />
<el-date-picker v-model="query.end_time__day" type="date" value-format="YYYY-MM-DD" format="YYYY-MM-DD"
placeholder="结束时间" />
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header>
<el-main>
@ -84,7 +50,7 @@
})
},
getShift() {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.optionsShift = res;
})
},

View File

@ -1,63 +1,30 @@
<template>
<el-dialog
:title="titleMap[mode]"
v-model="visible"
width="1000px"
:size="1000"
destroy-on-close
@closed="$emit('closed')"
>
<el-dialog :title="titleMap[mode]" v-model="visible" width="1000px" :size="1000" destroy-on-close
@closed="$emit('closed')">
<!-- 混料工序 -->
<el-form v-if="activeType == '8车间'" ref="dialogForm" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="工段" prop="material">
<el-select
v-model="form.mgroup"
placeholder="工段"
clearable
style="width:100%"
>
<el-option
v-for="item in mgroupOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.mgroup" placeholder="工段" clearable style="width:100%">
<el-option v-for="item in mgroupOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="产物" prop="material">
<el-select
v-model="form.material_out"
placeholder="产物"
clearable
style="width:100%"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.material_out" placeholder="产物" clearable style="width:100%">
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="设备" prop="material">
<el-select
v-model="form.equipment"
placeholder="设备"
clearable
style="width:100%"
>
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.equipment" placeholder="设备" clearable style="width:100%">
<el-option v-for="item in equipmentOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -68,43 +35,22 @@
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="数量" width="100">
<el-input-number
v-model="form.count_real"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="请输入数量">
<el-input-number v-model="form.count_real" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="请输入数量">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="重量" width="100">
<el-input-number
v-model="form.count_real_eweight"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="请输入重量">
<el-input-number v-model="form.count_real_eweight" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="请输入重量">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="配料人" prop="material">
<el-select
v-model="form.handle_users"
placeholder="配料人"
clearable
multiple
style="width:100%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-select v-model="form.handle_users" placeholder="配料人" clearable multiple style="width:100%">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
@ -115,43 +61,24 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="合格数">
<el-input-number
v-model="form.count_ok"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="请输入合格数">
<el-input-number v-model="form.count_ok" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="请输入合格数">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="不合格数">
<el-input-number
v-model="form.count_notok"
controls-position="right"
style="width:100%"
placeholder="不合格数"
disabled
>
<el-input-number v-model="form.count_notok" controls-position="right" style="width:100%"
placeholder="不合格数" disabled>
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="物料批次" prop="material_in">
<el-select
v-model="form.catch"
placeholder="物料批次"
clearable
style="width:100%"
@change="wmaterialInChange"
>
<el-option
v-for="item in wMaterialOptions"
:key="item.batch"
:label="item.batch"
:value="item.batch"
></el-option>
<el-select v-model="form.catch" placeholder="物料批次" clearable style="width:100%"
@change="wmaterialInChange">
<el-option v-for="item in wMaterialOptions" :key="item.batch" :label="item.batch"
:value="item.batch"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -160,97 +87,50 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="椭圆/弯曲">
<el-input-number
v-model="form.count_n_wq"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="椭圆/弯曲"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_wq" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="椭圆/弯曲" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="条纹">
<el-input-number
v-model="form.count_n_tw"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="条纹"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_tw" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="条纹" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="断裂">
<el-input-number
v-model="form.count_n_dl"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="断裂"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_dl" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="断裂" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="偏壁">
<el-input-number
v-model="form.count_n_pb"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="偏壁"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_pb" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="偏壁" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="大小头">
<el-input-number
v-model="form.count_n_dxt"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="大小头"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_dxt" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="大小头" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="结石气绒">
<el-input-number
v-model="form.count_n_jsqx"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="结石气绒"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_jsqx" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="结石气绒" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="箱中破">
<el-input-number
v-model="form.count_break"
controls-position="right"
style="width:100%"
placeholder="箱中破"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_break" controls-position="right" style="width:100%"
placeholder="箱中破" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
@ -258,50 +138,29 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="检测数">
<el-input-number
v-model="form.count"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="请输入检测数">
<el-input-number v-model="form.count" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="请输入检测数">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="检测合格数">
<el-input-number
v-model="form.count"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="请输入检测合格数">
<el-input-number v-model="form.count" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="请输入检测合格数">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="检测不合格数">
<el-input-number
v-model="form.count"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="请输入检测不合格数">
<el-input-number v-model="form.count" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="请输入检测不合格数">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="退火时间" prop="material">
<el-date-picker
v-model="form.handle_date"
type="date"
placeholder="退火时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style="width:100%"
/>
<el-date-picker v-model="form.handle_date" type="date" placeholder="退火时间" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" style="width:100%" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
@ -316,18 +175,9 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="产品名称" prop="material">
<el-select
v-model="form.material_out"
placeholder="产品名称"
disabled
style="width:100%"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.material_out" placeholder="产品名称" disabled style="width:100%">
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -338,91 +188,45 @@
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="锅号">
<el-select
v-model="form.equipment"
placeholder="锅号"
clearable
style="width:100%"
>
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.equipment" placeholder="锅号" clearable style="width:100%">
<el-option v-for="item in equipmentOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="第几锅">
<el-select
v-model="form.index"
placeholder="第几锅"
clearable
style="width:100%"
>
<el-option
v-for="item in 8"
:key="item"
:label="item"
:value="item"
></el-option>
<el-select v-model="form.index" placeholder="第几锅" clearable style="width:100%">
<el-option v-for="item in 8" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="生产量">
<el-input-number
v-model="form.count_real"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="生产量"
@change="countChange"
>
<el-input-number v-model="form.count_real" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="生产量" @change="countChange">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合格量">
<el-input-number
v-model="form.count_ok"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="合格量"
@change="countChange"
>
<el-input-number v-model="form.count_ok" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="合格量" @change="countChange">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合格率">
<!-- <span>{{ form.count_ok/form.count_real }}</span> -->
<el-input
v-model="form.rate"
style="width:100%"
disabled
placeholder="合格率">
<el-input v-model="form.rate" style="width:100%" disabled placeholder="合格率">
</el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="退火炉号">
<el-select
v-model="form.equipment_2"
placeholder="退火炉号"
clearable
style="width:100%"
>
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.equipment_2" placeholder="退火炉号" clearable style="width:100%">
<el-option v-for="item in equipmentOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -445,35 +249,15 @@
</el-col> -->
<el-col :md="12" :sm="24">
<el-form-item prop="type" label="成型人">
<el-select
v-model="form.handle_user"
placeholder="成型人"
clearable
style="width:100%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-select v-model="form.handle_user" placeholder="成型人" clearable style="width:100%">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item prop="type" label="切料人">
<el-select
v-model="form.handle_user_2"
placeholder="切料人"
clearable
style="width:100%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-select v-model="form.handle_user_2" placeholder="切料人" clearable style="width:100%">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
@ -482,83 +266,43 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="炸纹">
<el-input-number
v-model="form.count_n_zw"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="炸纹"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_zw" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="炸纹" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="条纹">
<el-input-number
v-model="form.count_n_tw"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="条纹"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_tw" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="条纹" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="气泡">
<el-input-number
v-model="form.count_n_qp"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="气泡"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_qp" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="气泡" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="弯曲">
<el-input-number
v-model="form.count_n_wq"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="弯曲"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_wq" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="弯曲" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="其他">
<el-input-number
v-model="form.count_n_qt"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="其他"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_qt" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="其他" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合计">
<el-input-number
v-model="form.count_notok"
controls-position="right"
style="width:100%"
placeholder="合计"
disabled
>
<el-input-number v-model="form.count_notok" controls-position="right" style="width:100%"
placeholder="合计" disabled>
</el-input-number>
</el-form-item>
</el-col>
@ -574,118 +318,57 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="产品名称" prop="material">
<el-select
v-model="form.material_out"
placeholder="产品名称"
disabled
style="width:100%"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.material_out" placeholder="产品名称" disabled style="width:100%">
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<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.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="form.shift" placeholder="班次" clearable style="width:100%">
<el-option v-for="item in shiftOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="出管总数">
<el-input-number
v-model="form.count_real"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="出管总数"
@change="countChange"
>
<el-input-number v-model="form.count_real" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="出管总数" @change="countChange">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合格总数">
<el-input-number
v-model="form.count_ok"
controls-position="right"
style="width:100%"
placeholder="合计"
:disabled="brothersList.length>0"
@change="countChange"
></el-input-number>
<el-input-number v-model="form.count_ok" controls-position="right" style="width:100%"
placeholder="合计" :disabled="brothersList.length > 0" @change="countChange"></el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合格率">
<el-input
v-model="form.rate"
style="width:100%"
disabled
placeholder="合格率">
<el-input v-model="form.rate" style="width:100%" disabled placeholder="合格率">
</el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item prop="type" label="成型人">
<el-select
v-model="form.handle_user"
placeholder="成型人"
clearable
style="width:100%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-select v-model="form.handle_user" placeholder="成型人" clearable style="width:100%">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item prop="type" label="带班人">
<el-select
v-model="form.handle_leader"
placeholder="带班人"
clearable
style="width:100%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-select v-model="form.handle_leader" placeholder="带班人" clearable style="width:100%">
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="碎料">
<el-input-number
v-model="form.count_break"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="碎料"
>
<el-input-number v-model="form.count_break" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="碎料">
</el-input-number>
</el-form-item>
</el-col>
@ -700,32 +383,16 @@
<el-row v-for="item in mlogb" :key="item">
<el-col :md="12" :sm="24">
<el-form-item label="产品名称" prop="material">
<el-select
v-model="item.material_out"
placeholder="产品名称"
disabled
style="width:100%"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="item.material_out" placeholder="产品名称" disabled style="width:100%">
<el-option v-for="item in materialOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合格数">
<el-input-number
v-model="item.count_ok"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="合格数"
@change="countOkSun"
>
<el-input-number v-model="item.count_ok" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="合格数" @change="countOkSun">
</el-input-number>
</el-form-item>
</el-col>
@ -736,97 +403,50 @@
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="椭圆/弯曲">
<el-input-number
v-model="form.count_n_wq"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="椭圆/弯曲"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_wq" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="椭圆/弯曲" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="条纹">
<el-input-number
v-model="form.count_n_tw"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="条纹"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_tw" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="条纹" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="断裂">
<el-input-number
v-model="form.count_n_dl"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="断裂"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_dl" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="断裂" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="偏壁">
<el-input-number
v-model="form.count_n_pb"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="偏壁"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_pb" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="偏壁" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="大小头">
<el-input-number
v-model="form.count_n_dxt"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="大小头"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_dxt" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="大小头" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="结石气绒">
<el-input-number
v-model="form.count_n_jsqx"
controls-position="right"
:min="0" step="1"
:step-strictly="true"
style="width:100%"
placeholder="结石气绒"
@change="countNotOkSun"
>
<el-input-number v-model="form.count_n_jsqx" controls-position="right" :min="0" step="1"
:step-strictly="true" style="width:100%" placeholder="结石气绒" @change="countNotOkSun">
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合计">
<el-input-number
v-model="form.count_notok"
controls-position="right"
style="width:100%"
placeholder="合计"
disabled
>
<el-input-number v-model="form.count_notok" controls-position="right" style="width:100%"
placeholder="合计" disabled>
</el-input-number>
</el-form-item>
</el-col>
@ -906,7 +526,7 @@
let day = date.getDate();
this.form.handle_date = year + '-' + month + '-' + day;
if (this.activeType == '10车间') {
this.$API.mtm.shift.req({page:0}).then(res=>{
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
this.shiftOptions = res;
})
if (this.mode == 'add') {