|
@@ -4,141 +4,146 @@
|
|
|
<section class="list-part-container" style="flex: 3">
|
|
|
<!-- 搜索区 -->
|
|
|
<el-form
|
|
|
- class="list-search-container"
|
|
|
- :model="queryDayworkParams"
|
|
|
- ref="queryRef"
|
|
|
- :inline="true"
|
|
|
- style="margin-right: 0px"
|
|
|
+ class="list-search-container"
|
|
|
+ :model="queryDayworkParams"
|
|
|
+ ref="queryRef"
|
|
|
+ :inline="true"
|
|
|
+ style="margin-right: 0px"
|
|
|
>
|
|
|
- <el-form-item class="section-title" label="生产批次"/>
|
|
|
+ <el-form-item class="section-title" label="生产批次" />
|
|
|
<el-form-item label="生产计划单号:">
|
|
|
<el-input
|
|
|
- placeholder="请输入生产计划单号/批次号"
|
|
|
- v-model.trim="queryDayworkParams.productionPlanNo"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
+ placeholder="请输入生产计划单号/批次号"
|
|
|
+ v-model.trim="queryDayworkParams.productionPlanNo"
|
|
|
+ @keydown.enter.prevent
|
|
|
+ clearable
|
|
|
+ style="width: 200px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="产品描述:">
|
|
|
<el-input
|
|
|
- placeholder="请输入产品描述"
|
|
|
- v-model.trim="queryDayworkParams.productDescription"
|
|
|
- @keydown.enter.prevent
|
|
|
- clearable
|
|
|
- style="width: 130px"
|
|
|
+ placeholder="请输入产品描述"
|
|
|
+ v-model.trim="queryDayworkParams.productDescription"
|
|
|
+ @keydown.enter.prevent
|
|
|
+ clearable
|
|
|
+ style="width: 130px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="section-title" label="请选择当前工段:">
|
|
|
<el-select-v2
|
|
|
- v-model="queryDayworkParams.deptId"
|
|
|
- :options="deptList"
|
|
|
- placeholder="请选择工段"
|
|
|
- style="width: 140px"
|
|
|
- @change="handleDeptChange"
|
|
|
+ v-model="queryDayworkParams.deptId"
|
|
|
+ :options="deptList"
|
|
|
+ placeholder="请选择工段"
|
|
|
+ style="width: 140px"
|
|
|
+ @change="handleDeptChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-left: 0">
|
|
|
<el-button
|
|
|
- type="info"
|
|
|
- icon="Search"
|
|
|
- :disabled="deptList.length === 0"
|
|
|
- @click="handleQuery"
|
|
|
- >搜索
|
|
|
+ type="info"
|
|
|
+ icon="Search"
|
|
|
+ :disabled="deptList.length === 0"
|
|
|
+ @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"
|
|
|
+ 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"
|
|
|
+ label="客户简称"
|
|
|
+ prop="companyAlias"
|
|
|
+ width="120"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="生产计划单号"
|
|
|
- prop="productionPlanNo"
|
|
|
- width="100"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="批次号"
|
|
|
- prop="lotCode"
|
|
|
- width="120"
|
|
|
- align="center"
|
|
|
+ label="生产计划单号"
|
|
|
+ prop="productionPlanNo"
|
|
|
+ width="100"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
+ <el-table-column label="批次号" prop="lotCode" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ v-hasPermi="['business:productionPlan:query']"
|
|
|
+ @click="handleColumnClick(scope.row)"
|
|
|
+ ><span>{{ scope.row.lotCode }}</span></el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- label="产品描述"
|
|
|
- prop="productDescription"
|
|
|
- align="center"
|
|
|
+ label="产品描述"
|
|
|
+ prop="productDescription"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="图纸版本"
|
|
|
- prop="technologyVersion"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
+ label="图纸版本"
|
|
|
+ prop="technologyVersion"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="投产量"
|
|
|
- prop="productionQuantity"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
+ label="投产量"
|
|
|
+ prop="productionQuantity"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="下达日期"
|
|
|
- prop="createTime"
|
|
|
- width="100"
|
|
|
- align="center"
|
|
|
+ label="下达日期"
|
|
|
+ prop="createTime"
|
|
|
+ width="100"
|
|
|
+ align="center"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<span>{{
|
|
|
- proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
|
|
|
- }}</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"
|
|
|
+ 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"
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ v-model:page="queryDayworkParams.pageNum"
|
|
|
+ v-model:limit="queryDayworkParams.pageSize"
|
|
|
+ @pagination="getDayworks"
|
|
|
/>
|
|
|
</section>
|
|
|
<!-- 右侧区域 -->
|
|
|
<section class="list-part-container" style="flex: 2">
|
|
|
<el-form class="list-search-container" :inline="true">
|
|
|
- <el-form-item class="section-title" label="报工信息"/>
|
|
|
+ <el-form-item class="section-title" label="报工信息" />
|
|
|
<el-form-item
|
|
|
- class="section-title"
|
|
|
- label="请选择工序:"
|
|
|
- prop="processId"
|
|
|
+ class="section-title"
|
|
|
+ label="请选择工序:"
|
|
|
+ prop="processId"
|
|
|
>
|
|
|
<el-select-v2
|
|
|
- v-model="queryItemParams.processId"
|
|
|
- clearable
|
|
|
- :options="processList"
|
|
|
- placeholder="请选择工序"
|
|
|
- style="width: 100%"
|
|
|
- @change="handleProcessChange"
|
|
|
+ v-model="queryItemParams.processId"
|
|
|
+ clearable
|
|
|
+ :options="processList"
|
|
|
+ placeholder="请选择工序"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="handleProcessChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -146,96 +151,94 @@
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
<el-table
|
|
|
- :data="dayworkItemList"
|
|
|
- v-loading="dayworkItemLoading"
|
|
|
- height="100%"
|
|
|
+ :data="dayworkItemList"
|
|
|
+ v-loading="dayworkItemLoading"
|
|
|
+ height="100%"
|
|
|
>
|
|
|
<el-table-column
|
|
|
- label="操作者"
|
|
|
- prop="nickName"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
+ label="操作者"
|
|
|
+ prop="nickName"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="工序名称"
|
|
|
- prop="processAlias"
|
|
|
- align="center"
|
|
|
+ label="工序名称"
|
|
|
+ prop="processAlias"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="投产量"
|
|
|
- prop="prodNum"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
+ label="投产量"
|
|
|
+ prop="prodNum"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="合格数"
|
|
|
- prop="qualifiedNum"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
+ label="合格数"
|
|
|
+ prop="qualifiedNum"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="废品数"
|
|
|
- prop="rejectNum"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
+ label="废品数"
|
|
|
+ prop="rejectNum"
|
|
|
+ width="60"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="开始时间"
|
|
|
- prop="startTime"
|
|
|
- width="160"
|
|
|
- align="center"
|
|
|
+ label="开始时间"
|
|
|
+ prop="startTime"
|
|
|
+ width="160"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="结束时间"
|
|
|
- prop="endTime"
|
|
|
- width="160"
|
|
|
- align="center"
|
|
|
+ label="结束时间"
|
|
|
+ prop="endTime"
|
|
|
+ width="160"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="总工时"
|
|
|
- prop="workingHours"
|
|
|
- width="160"
|
|
|
- align="center"
|
|
|
+ label="总工时"
|
|
|
+ prop="workingHours"
|
|
|
+ width="160"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- label="生产状态"
|
|
|
- prop="status"
|
|
|
- width="100"
|
|
|
- align="center"
|
|
|
+ label="生产状态"
|
|
|
+ prop="status"
|
|
|
+ width="100"
|
|
|
+ align="center"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
- <dict-tag :options="daywork_status" :value="scope.row.status"/>
|
|
|
+ <dict-tag :options="daywork_status" :value="scope.row.status" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- fixed="right"
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- width="70px"
|
|
|
+ fixed="right"
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ width="70px"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
|
- v-if="
|
|
|
+ v-if="
|
|
|
scope.row.deptProcessStatus &&
|
|
|
(scope.row.status == 2 || scope.row.status == 3) &&
|
|
|
scope.row.processId == latestProcessId
|
|
|
"
|
|
|
- link
|
|
|
- type="warning"
|
|
|
- icon="Edit"
|
|
|
- @click="handleUpdateDayworkItem(scope.row)"
|
|
|
- >编辑
|
|
|
- </el-button
|
|
|
- >
|
|
|
+ link
|
|
|
+ type="warning"
|
|
|
+ icon="Edit"
|
|
|
+ @click="handleUpdateDayworkItem(scope.row)"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
- v-else
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- icon="View"
|
|
|
- @click="handleCheckDayworkItem(scope.row)"
|
|
|
- >查看
|
|
|
- </el-button
|
|
|
- >
|
|
|
+ v-else
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ icon="View"
|
|
|
+ @click="handleCheckDayworkItem(scope.row)"
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -243,17 +246,17 @@
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
<pagination
|
|
|
- v-show="itemTotal > 0"
|
|
|
- :total="itemTotal"
|
|
|
- v-model:page="queryItemParams.pageNum"
|
|
|
- v-model:limit="queryItemParams.pageSize"
|
|
|
- @pagination="getDayworkItems"
|
|
|
+ v-show="itemTotal > 0"
|
|
|
+ :total="itemTotal"
|
|
|
+ v-model:page="queryItemParams.pageNum"
|
|
|
+ v-model:limit="queryItemParams.pageSize"
|
|
|
+ @pagination="getDayworkItems"
|
|
|
/>
|
|
|
</section>
|
|
|
<!-- 报工信息表单 -->
|
|
|
<daywork-item-form
|
|
|
- ref="dayworkItemRef"
|
|
|
- @handleSaveSuccess="handleGetDayworkItems"
|
|
|
+ ref="dayworkItemRef"
|
|
|
+ @handleSaveSuccess="handleGetDayworkItems"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -264,14 +267,15 @@ import {
|
|
|
listDayworkItem,
|
|
|
getProcessList,
|
|
|
} from "@/api/business/daywork.js";
|
|
|
-import {listDeptProcess} from "@/api/business/deptProcess";
|
|
|
-import {getDept} from "@/api/business/planDetailSubDetail.js";
|
|
|
+import { listDeptProcess } from "@/api/business/deptProcess";
|
|
|
+import { getDept } from "@/api/business/planDetailSubDetail.js";
|
|
|
+import router from "@/router";
|
|
|
import dayworkItemForm from "./form";
|
|
|
|
|
|
-const {proxy} = getCurrentInstance();
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
|
|
|
/** 字典 */
|
|
|
-const {daywork_status} = proxy.useDict("daywork_status");
|
|
|
+const { daywork_status } = proxy.useDict("daywork_status");
|
|
|
|
|
|
/** 生产批次 */
|
|
|
const dayworkList = ref([]);
|
|
@@ -345,27 +349,31 @@ function getDayworks() {
|
|
|
// 批次
|
|
|
if (dayworkList.value.length > 0) {
|
|
|
proxy.$refs.dayworkTable.setCurrentRow(dayworkList.value[0]);
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
dayworkItemList.value = [];
|
|
|
- itemTotal.value = 0
|
|
|
+ itemTotal.value = 0;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/** 打开批次详情页 */
|
|
|
+function handleColumnClick(row) {
|
|
|
+ router.push({ path: "/reviseBath/lotFormParticulars/" + row.lotCode });
|
|
|
+}
|
|
|
+
|
|
|
/** 生产计划明细 current-change 事件 */
|
|
|
function handleDayworkCurrentChange(row) {
|
|
|
if (row) {
|
|
|
- queryItemParams.value.processId = null
|
|
|
+ queryItemParams.value.processId = null;
|
|
|
currentDaywork.value = row;
|
|
|
queryItemParams.value.dayworkId = currentDaywork.value.id;
|
|
|
queryItemParams.value.technologicalProcessDetailId = null;
|
|
|
queryItemParams.value.technologicalProcessId = row.technologicalProcessId;
|
|
|
getDayworkItems();
|
|
|
- getProcess()
|
|
|
+ getProcess();
|
|
|
} else {
|
|
|
dayworkItemList.value = [];
|
|
|
- itemTotal.value = 0
|
|
|
+ itemTotal.value = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -405,22 +413,25 @@ function handleUpdateDayworkItem(row) {
|
|
|
let totalQuailifiedNum = 0;
|
|
|
for (let i = 0; i < dayworkItemList.value.length; i++) {
|
|
|
if (
|
|
|
- row.processId == dayworkItemList.value[i].processId &&
|
|
|
- (dayworkItemList.value[i].status == 2 ||
|
|
|
- dayworkItemList.value[i].status == 3) &&
|
|
|
- row.id != dayworkItemList.value[i].id
|
|
|
+ row.processId == dayworkItemList.value[i].processId &&
|
|
|
+ (dayworkItemList.value[i].status == 2 ||
|
|
|
+ dayworkItemList.value[i].status == 3) &&
|
|
|
+ row.id != dayworkItemList.value[i].id
|
|
|
) {
|
|
|
totalQuailifiedNum += dayworkItemList.value[i].qualifiedNum;
|
|
|
}
|
|
|
if (
|
|
|
- row.processId == dayworkItemList.value[i].processId &&
|
|
|
- dayworkItemList.value[i].status == 3 &&
|
|
|
- row.id != dayworkItemList.value[i].id
|
|
|
+ row.processId == dayworkItemList.value[i].processId &&
|
|
|
+ dayworkItemList.value[i].status == 3 &&
|
|
|
+ row.id != dayworkItemList.value[i].id
|
|
|
) {
|
|
|
processFinish = true;
|
|
|
}
|
|
|
}
|
|
|
- let maxQuailifiedNum = (Math.floor(row.prodNum * 1.03 - totalQuailifiedNum))>0?Math.floor(row.prodNum * 1.03 - totalQuailifiedNum):0;
|
|
|
+ let maxQuailifiedNum =
|
|
|
+ Math.floor(row.prodNum * 1.03 - totalQuailifiedNum) > 0
|
|
|
+ ? Math.floor(row.prodNum * 1.03 - totalQuailifiedNum)
|
|
|
+ : 0;
|
|
|
//该daywork合格数总数不能超过投产数的103%
|
|
|
row.technologicalProcessId = queryItemParams.value.technologicalProcessId;
|
|
|
row.deptId = queryDayworkParams.value.deptId;
|
|
@@ -474,20 +485,20 @@ function handleProcessChange() {
|
|
|
function getDayworkItems() {
|
|
|
dayworkItemLoading.value = true;
|
|
|
//查询该工段在工段资源分配时绑定的工序,传一个flag,如果flag有值则后端查询不分页
|
|
|
- listDeptProcess({deptId: queryDayworkParams.value.deptId, flag: 1}).then(
|
|
|
- (res) => {
|
|
|
- deptProcessList.value = res.rows;
|
|
|
- }
|
|
|
+ listDeptProcess({ deptId: queryDayworkParams.value.deptId, flag: 1 }).then(
|
|
|
+ (res) => {
|
|
|
+ deptProcessList.value = res.rows;
|
|
|
+ }
|
|
|
);
|
|
|
listDayworkItem(queryItemParams.value).then((res) => {
|
|
|
- console.log(currentDaywork.value)
|
|
|
+ console.log(currentDaywork.value);
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
//如果时首序,投产数是单批数
|
|
|
if (res.rows[i].prodNum == 0) {
|
|
|
- if(currentDaywork.value.isLast == 1) {
|
|
|
+ if (currentDaywork.value.isLast == 1) {
|
|
|
res.rows[i].prodNum = currentDaywork.value.lastLotQuantity;
|
|
|
- }else {
|
|
|
- res.rows[i].prodNum = currentDaywork.value.oneLotQuantity;
|
|
|
+ } else {
|
|
|
+ res.rows[i].prodNum = currentDaywork.value.oneLotQuantity;
|
|
|
}
|
|
|
}
|
|
|
//拿到最新一条报工信息的工序id,只能编辑当前序
|
|
@@ -511,19 +522,19 @@ function getDayworkItems() {
|
|
|
}
|
|
|
}
|
|
|
dayworkItemList.value = res.rows;
|
|
|
- getProcess()
|
|
|
+ getProcess();
|
|
|
itemTotal.value = res.total;
|
|
|
dayworkItemLoading.value = false;
|
|
|
});
|
|
|
}
|
|
|
//工序信息
|
|
|
function getProcess() {
|
|
|
- //工序下拉框
|
|
|
- getProcessList({
|
|
|
- technologicalProcessId: queryItemParams.value.technologicalProcessId,
|
|
|
- }).then((res) => {
|
|
|
- processList.value = res.data;
|
|
|
- });
|
|
|
+ //工序下拉框
|
|
|
+ getProcessList({
|
|
|
+ technologicalProcessId: queryItemParams.value.technologicalProcessId,
|
|
|
+ }).then((res) => {
|
|
|
+ processList.value = res.data;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/** 搜索按钮操作 */
|