|
@@ -3,64 +3,30 @@
|
|
|
<!-- 左侧区域 -->
|
|
|
<section class="list-part-container" style="flex: 1">
|
|
|
<!-- 搜索区 -->
|
|
|
- <el-form
|
|
|
- class="list-search-container"
|
|
|
- :model="queryDayworkParams"
|
|
|
- ref="queryRef"
|
|
|
- :inline="true"
|
|
|
- style="margin-right: 0px"
|
|
|
- >
|
|
|
+ <el-form class="list-search-container" :model="queryDayworkParams" ref="queryRef" :inline="true"
|
|
|
+ style="margin-right: 0px">
|
|
|
<el-form-item class="section-title" label="生产批次" />
|
|
|
<el-form-item label="产品描述:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入产品描述"
|
|
|
- v-model="queryDayworkParams.productDescription"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入产品描述" v-model="queryDayworkParams.productDescription" @keydown.enter.prevent
|
|
|
+ clearable style="width: 200px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="批次号:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入批次号"
|
|
|
- v-model="queryDayworkParams.productionPlanNo"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 140px"
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入批次号" v-model="queryDayworkParams.productionPlanNo" @keydown.enter.prevent clearable
|
|
|
+ style="width: 140px" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="生产状态:" prop="status" align="center">
|
|
|
- <el-select
|
|
|
- v-model="queryDayworkParams.status"
|
|
|
- clearable
|
|
|
- placeholder="请选择生产状态"
|
|
|
- style="width: 80px"
|
|
|
- @change="handleChangeStatus"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="dict in statusOptions"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- ></el-option>
|
|
|
+ <el-select v-model="queryDayworkParams.status" clearable placeholder="请选择生产状态" style="width: 80px"
|
|
|
+ @change="handleChangeStatus">
|
|
|
+ <el-option v-for="dict in statusOptions" :key="dict.value" :label="dict.label"
|
|
|
+ :value="dict.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="批次状态:">
|
|
|
- <el-select
|
|
|
- style="width: 160px"
|
|
|
- multiple
|
|
|
- v-model="queryDayworkParams.flags"
|
|
|
- clearable
|
|
|
- placeholder="请选择标识"
|
|
|
- @change="handleFlagChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in is_identification"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- ></el-option>
|
|
|
+ <el-select style="width: 160px" multiple v-model="queryDayworkParams.flags" clearable placeholder="请选择标识"
|
|
|
+ @change="handleFlagChange">
|
|
|
+ <el-option v-for="item in is_identification" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="批次状态:" prop="status" align="center">
|
|
@@ -71,36 +37,17 @@
|
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="炉号:">
|
|
|
- <el-input
|
|
|
- placeholder="请输入炉号"
|
|
|
- v-model="queryDayworkParams.furnaceNumber"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 160px"
|
|
|
- />
|
|
|
+ <el-input placeholder="请输入炉号" v-model="queryDayworkParams.furnaceNumber" @keydown.enter.prevent clearable
|
|
|
+ style="width: 160px" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="下达日期:">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryDayworkParams.queryStartTime"
|
|
|
- type="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- :editable="false"
|
|
|
- :clearable="false"
|
|
|
- placeholder="请选择开始时间"
|
|
|
- style="width: 130px"
|
|
|
- @change="handleDateChange"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="queryDayworkParams.queryStartTime" type="date" value-format="YYYY-MM-DD"
|
|
|
+ :editable="false" :clearable="false" placeholder="请选择开始时间" style="width: 130px"
|
|
|
+ @change="handleDateChange" />
|
|
|
<span>到</span>
|
|
|
- <el-date-picker
|
|
|
- v-model="queryDayworkParams.queryEndTime"
|
|
|
- type="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- :editable="false"
|
|
|
- :clearable="false"
|
|
|
- placeholder="请选择结束时间"
|
|
|
- style="width: 130px"
|
|
|
- @change="handleDateChange"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="queryDayworkParams.queryEndTime" type="date" value-format="YYYY-MM-DD"
|
|
|
+ :editable="false" :clearable="false" placeholder="请选择结束时间" style="width: 130px"
|
|
|
+ @change="handleDateChange" />
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="下达日期:">
|
|
|
<el-date-picker
|
|
@@ -116,67 +63,27 @@
|
|
|
/>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item style="margin-left: 0">
|
|
|
- <el-button type="info" icon="Search" @click="handleQuery"
|
|
|
- >搜索
|
|
|
+ <el-button type="info" icon="Search" @click="handleQuery">搜索
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table
|
|
|
- ref="dayworkTable"
|
|
|
- :data="dayworkList"
|
|
|
- v-loading="dayworkLoading"
|
|
|
- highlight-current-row
|
|
|
- height="100%"
|
|
|
- @current-change="handleDayworkCurrentChange"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- label="客户简称"
|
|
|
- prop="companyAlias"
|
|
|
- width="120"
|
|
|
- align="center"
|
|
|
- />
|
|
|
+ <el-table ref="dayworkTable" :data="dayworkList" v-loading="dayworkLoading" highlight-current-row
|
|
|
+ height="100%" @current-change="handleDayworkCurrentChange">
|
|
|
+ <el-table-column label="客户简称" prop="companyAlias" width="120" align="center" />
|
|
|
<!-- <el-table-column label="生产计划单号" prop="productionPlanNo" width="100" align="center" /> -->
|
|
|
- <el-table-column
|
|
|
- label="批次号"
|
|
|
- min-width="120"
|
|
|
- prop="lotCode"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column label="批次号" min-width="120" prop="lotCode" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="handleColumnClick(scope.row)"
|
|
|
- ><span>{{ scope.row.lotCode }}</span></el-button
|
|
|
- >
|
|
|
+ <el-button link type="primary" @click="handleColumnClick(scope.row)"><span>{{ scope.row.lotCode
|
|
|
+ }}</span></el-button>
|
|
|
<!-- <span v-else>{{ scope.row.lotCode }}</span> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="产品描述"
|
|
|
- prop="product.description"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="图纸版本"
|
|
|
- prop="technologyVersion"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="炉号"
|
|
|
- prop="furnaceNumber"
|
|
|
- width="120"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="投产量"
|
|
|
- prop="daywork.productionQuantity"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column label="产品描述" prop="product.description" align="center" />
|
|
|
+ <el-table-column label="图纸版本" prop="technologyVersion" width="60" align="center" />
|
|
|
+ <el-table-column label="炉号" prop="furnaceNumber" width="120" align="center" />
|
|
|
+ <el-table-column label="投产量" prop="daywork.productionQuantity" width="60" align="center">
|
|
|
<template #default="scope">
|
|
|
{{
|
|
|
scope.row.daywork != null
|
|
@@ -185,24 +92,16 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="生产状态"
|
|
|
- prop="status"
|
|
|
- width="80"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column label="生产状态" prop="status" width="80" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-tag
|
|
|
- :type="
|
|
|
- statusFilter(
|
|
|
- scope.row.daywork != null
|
|
|
- ? scope.row.daywork.status == 0
|
|
|
- ? 1
|
|
|
- : scope.row.daywork.status
|
|
|
- : 0
|
|
|
- )
|
|
|
- "
|
|
|
- >{{
|
|
|
+ <el-tag :type="statusFilter(
|
|
|
+ scope.row.daywork != null
|
|
|
+ ? scope.row.daywork.status == 0
|
|
|
+ ? 1
|
|
|
+ : scope.row.daywork.status
|
|
|
+ : 0
|
|
|
+ )
|
|
|
+ ">{{
|
|
|
statusFilterText(
|
|
|
scope.row.daywork != null
|
|
|
? scope.row.daywork.status == 0
|
|
@@ -210,27 +109,16 @@
|
|
|
: scope.row.daywork.status
|
|
|
: 0
|
|
|
)
|
|
|
- }}</el-tag
|
|
|
- >
|
|
|
+ }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="批次状态" align="center" prop="lotID">
|
|
|
<template #default="scope">
|
|
|
- <el-tag
|
|
|
- v-if="scope.row.isAmend == 1"
|
|
|
- class="spacing"
|
|
|
- type="danger"
|
|
|
- >{{ "工艺修改" }}</el-tag
|
|
|
- >
|
|
|
+ <el-tag v-if="scope.row.isAmend == 1" class="spacing" type="danger">{{ "工艺修改" }}</el-tag>
|
|
|
<!-- <el-tag v-if="scope.row.isWasteRecycling == 1" class="spacing" type="danger">{{ "废品回用" }}</el-tag> -->
|
|
|
<!-- <el-tag v-if="scope.row.isWasteRecycling == 0 && scope.row.isAmend == 0" class="spacing">{{
|
|
|
"正常批次" }}</el-tag> -->
|
|
|
- <el-tag
|
|
|
- v-if="scope.row.isSuperaddition == 1"
|
|
|
- class="warning"
|
|
|
- type="warning"
|
|
|
- >{{ "追增" }}</el-tag
|
|
|
- >
|
|
|
+ <el-tag v-if="scope.row.isSuperaddition == 1" class="warning" type="warning">{{ "追增" }}</el-tag>
|
|
|
<el-tag v-if="scope.row.isWaste == 1" class="" type="danger">{{
|
|
|
"批废"
|
|
|
}}</el-tag>
|
|
@@ -240,72 +128,33 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="报工状态" width="80" align="center">
|
|
|
<template #default="scope">
|
|
|
- <dict-tag
|
|
|
- :options="daywork_status"
|
|
|
- :value="
|
|
|
- scope.row.daywork ? scope.row.daywork.reportStatus : 0
|
|
|
- "
|
|
|
- />
|
|
|
+ <dict-tag :options="daywork_status" :value="scope.row.daywork ? scope.row.daywork.reportStatus : 0
|
|
|
+ " />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="总批数"
|
|
|
- width="80"
|
|
|
- prop="totalLotNumber"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="合格量"
|
|
|
- width="80"
|
|
|
- prop="daywork.temporaryProcessQualifiedNum"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="完工日期"
|
|
|
- width="100"
|
|
|
- prop="daywork.finishedTime"
|
|
|
- align="center"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="下达日期"
|
|
|
- prop="createTime"
|
|
|
- width="100"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column label="总批数" width="80" prop="totalLotNumber" align="center"></el-table-column>
|
|
|
+ <el-table-column label="合格量" width="80" prop="daywork.temporaryProcessQualifiedNum"
|
|
|
+ align="center"></el-table-column>
|
|
|
+ <el-table-column label="完工日期" width="100" prop="daywork.finishedTime" align="center"></el-table-column>
|
|
|
+ <el-table-column label="下达日期" prop="createTime" width="100" align="center">
|
|
|
<template #default="scope">
|
|
|
<span>{{
|
|
|
proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
|
|
|
}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="报工总时长"
|
|
|
- prop="totalWorkingHours"
|
|
|
- width="150"
|
|
|
- align="center"
|
|
|
- />
|
|
|
+ <el-table-column label="报工总时长" prop="totalWorkingHours" width="150" align="center" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- v-model:page="queryDayworkParams.pageNum"
|
|
|
- v-model:limit="queryDayworkParams.pageSize"
|
|
|
- @pagination="getDayworks"
|
|
|
- />
|
|
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryDayworkParams.pageNum"
|
|
|
+ v-model:limit="queryDayworkParams.pageSize" @pagination="getDayworks" />
|
|
|
</section>
|
|
|
<!-- 报工信息表单 -->
|
|
|
- <daywork-item-form
|
|
|
- ref="dayworkItemRef"
|
|
|
- @handleSaveSuccess="handleGetDayworkItems"
|
|
|
- />
|
|
|
+ <daywork-item-form ref="dayworkItemRef" @handleSaveSuccess="handleGetDayworkItems" />
|
|
|
<!-- 分选报工信息表单 -->
|
|
|
- <sort-item-form
|
|
|
- ref="sortItemRef"
|
|
|
- @handleSaveSuccess="handleGetDayworkItems"
|
|
|
- />
|
|
|
+ <sort-item-form ref="sortItemRef" @handleSaveSuccess="handleGetDayworkItems" />
|
|
|
<!-- 报工历史修改表单 -->
|
|
|
<dialog-daywork-item-history ref="dialogDayworkItemHistoryRef" />
|
|
|
</div>
|
|
@@ -326,7 +175,8 @@ import dayworkItemForm from "./form";
|
|
|
import sortItemForm from "./sortForm";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
import productionPlanDetailStore from "@/store/modules/productionPlanDetail";
|
|
|
-import { stubArray } from "lodash-es";
|
|
|
+const { report_up_limit } = proxy.useDict("report_up_limit")
|
|
|
+const { sort_report_up_limit } = proxy.useDict("sort_report_up_limit")
|
|
|
|
|
|
const is_identification = ref([
|
|
|
// {
|
|
@@ -451,9 +301,9 @@ function getDayworks() {
|
|
|
dateRange.value =
|
|
|
productionPlanDetailQueryParams.queryStartTime != null
|
|
|
? [
|
|
|
- productionPlanDetailQueryParams.queryStartTime,
|
|
|
- productionPlanDetailQueryParams.queryEndTime,
|
|
|
- ]
|
|
|
+ productionPlanDetailQueryParams.queryStartTime,
|
|
|
+ productionPlanDetailQueryParams.queryEndTime,
|
|
|
+ ]
|
|
|
: null;
|
|
|
}
|
|
|
lotList(queryDayworkParams.value).then((res) => {
|
|
@@ -462,7 +312,7 @@ function getDayworks() {
|
|
|
// console.log(i, dayworkList.value[i], dayworkList.value[i].daywork)
|
|
|
let timeStamp =
|
|
|
dayworkList.value[i].daywork &&
|
|
|
- dayworkList.value[i].daywork.totalWorkingHours
|
|
|
+ dayworkList.value[i].daywork.totalWorkingHours
|
|
|
? dayworkList.value[i].daywork.totalWorkingHours
|
|
|
: 0;
|
|
|
let seconds = Math.floor((timeStamp / 1000) % 60);
|
|
@@ -582,9 +432,9 @@ function handleDeletedItem(id) {
|
|
|
// 批次
|
|
|
proxy.$refs.dayworkTable.setCurrentRow(
|
|
|
dayworkList.value[
|
|
|
- dayworkList.value.findIndex(
|
|
|
- (daywork) => daywork.id == currentDaywork.value.id
|
|
|
- )
|
|
|
+ dayworkList.value.findIndex(
|
|
|
+ (daywork) => daywork.id == currentDaywork.value.id
|
|
|
+ )
|
|
|
]
|
|
|
);
|
|
|
});
|
|
@@ -594,6 +444,8 @@ function handleDeletedItem(id) {
|
|
|
}
|
|
|
//修改报工信息
|
|
|
function handleSelectDayworkItem(row) {
|
|
|
+ const upLimitForReport = Number(report_up_limit[0].dictValue) / 100
|
|
|
+ const upLimitForSort = Number(sort_report_up_limit[0].dictValue) / 100
|
|
|
//同工序下状态是否有工序已完成
|
|
|
let processFinish = false;
|
|
|
//除了编辑此条以外的同工序合格数
|
|
@@ -615,10 +467,14 @@ function handleSelectDayworkItem(row) {
|
|
|
processFinish = true;
|
|
|
}
|
|
|
}
|
|
|
- let maxQuailifiedNum =
|
|
|
- Math.floor(row.prodNum * 1.03 - totalQuailifiedNum) > 0
|
|
|
- ? Math.floor(row.prodNum * 1.03 - totalQuailifiedNum)
|
|
|
- : 0;
|
|
|
+ let maxQuailifiedNum = row.isSort == 0 ?
|
|
|
+ (Math.floor(row.prodNum * upLimitForReport - totalQuailifiedNum) > 0
|
|
|
+ ? Math.floor(row.prodNum * upLimitForReport - totalQuailifiedNum)
|
|
|
+ : 0)
|
|
|
+ :
|
|
|
+ (Math.floor(row.prodNum * upLimitForReport - totalQuailifiedNum) > 0
|
|
|
+ ? Math.floor(row.prodNum * upLimitForReport - totalQuailifiedNum)
|
|
|
+ : 0);
|
|
|
//该daywork合格数总数不能超过投产数的103%
|
|
|
row.technologicalProcessId = queryItemParams.value.technologicalProcessId;
|
|
|
row.deptId = queryDayworkParams.value.deptId;
|
|
@@ -760,7 +616,7 @@ function getProcess() {
|
|
|
function handleQuery() {
|
|
|
if (
|
|
|
queryDayworkParams.value.queryEndTime <
|
|
|
- queryDayworkParams.value.queryStartTime &&
|
|
|
+ queryDayworkParams.value.queryStartTime &&
|
|
|
queryDayworkParams.value.queryStartTime != "" &&
|
|
|
queryDayworkParams.value.queryEndTime != ""
|
|
|
) {
|
|
@@ -826,7 +682,7 @@ function statusFilterText(status) {
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
-function handleDateChange() {}
|
|
|
+function handleDateChange() { }
|
|
|
|
|
|
onMounted(() => {
|
|
|
getList();
|