|
@@ -1,16 +1,19 @@
|
|
<template>
|
|
<template>
|
|
<!-- 添加或修改项目信息对话框 -->
|
|
<!-- 添加或修改项目信息对话框 -->
|
|
<el-drawer
|
|
<el-drawer
|
|
- v-model="visible"
|
|
|
|
- size="90%"
|
|
|
|
- direction="rtl"
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
|
|
+ v-model="visible"
|
|
|
|
+ size="90%"
|
|
|
|
+ direction="rtl"
|
|
|
|
+ :close-on-press-escape="false"
|
|
>
|
|
>
|
|
<div class="page-container form-container">
|
|
<div class="page-container form-container">
|
|
- <div class="form-btns-container" style="display: flex; align-items: center;">
|
|
|
|
- <span class="title-label"
|
|
|
|
- ><el-icon>
|
|
|
|
- <Document/>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="form-btns-container"
|
|
|
|
+ style="display: flex; align-items: center"
|
|
|
|
+ >
|
|
|
|
+ <span class="title-label"
|
|
|
|
+ ><el-icon>
|
|
|
|
+ <Document />
|
|
</el-icon>
|
|
</el-icon>
|
|
计划详情</span
|
|
计划详情</span
|
|
>
|
|
>
|
|
@@ -82,105 +85,149 @@
|
|
>搜索</el-button
|
|
>搜索</el-button
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <div style="margin-top: 20px;">
|
|
|
|
- <el-button type="primary" @click="handleFallback"
|
|
|
|
- >回退</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <div style="margin-top: 20px">
|
|
|
|
+ <el-button type="primary" @click="handleFallback">回退</el-button>
|
|
<el-button type="primary" @click="handleWasteRecycling"
|
|
<el-button type="primary" @click="handleWasteRecycling"
|
|
>添加废品回用</el-button
|
|
>添加废品回用</el-button
|
|
>
|
|
>
|
|
- <el-button type="primary" @click="handleQuerydaywork"
|
|
|
|
- >分批</el-button
|
|
|
|
- >
|
|
|
|
- <el-button type="primary" @click="handleQuerydaywork"
|
|
|
|
|
|
+ <el-button type="primary" @click="handleQuerydaywork">分批</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="once"
|
|
|
|
+ @click="handleOnceSingleChange"
|
|
>单批单改</el-button
|
|
>单批单改</el-button
|
|
>
|
|
>
|
|
- <el-button type="primary" @click="handleQuerydaywork"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="multi"
|
|
|
|
+ @click="handleQuerydaywork"
|
|
>多批单改</el-button
|
|
>多批单改</el-button
|
|
>
|
|
>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 列表区 -->
|
|
<!-- 列表区 -->
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<el-table
|
|
<el-table
|
|
- ref="dayworkTable"
|
|
|
|
- v-loading="loading"
|
|
|
|
- row-key="id"
|
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
- height="100%"
|
|
|
|
- :data="dayworkList"
|
|
|
|
|
|
+ ref="dayworkTable"
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ row-key="id"
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
|
+ height="100%"
|
|
|
|
+ :data="dayworkList"
|
|
>
|
|
>
|
|
- <el-table-column type="selection" width="40" align="center"/>
|
|
|
|
- <el-table-column label="客户简称" prop="companyAlias" align="center"/>
|
|
|
|
- <el-table-column label="生产计划单号" width="100" prop="productionPlanNo" align="center"/>
|
|
|
|
- <el-table-column label="批次号" prop="lotCode" align="center"/>
|
|
|
|
- <el-table-column label="产品描述" prop="productDescription" align="center"/>
|
|
|
|
- <el-table-column label="图纸版本" width="80" prop="technologyVersion" align="center"/>
|
|
|
|
- <el-table-column label="投产量" width="100" prop="productionQuantity" align="center"/>
|
|
|
|
|
|
+ <el-table-column type="selection" width="40" align="center" />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="客户简称"
|
|
|
|
+ prop="companyAlias"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="生产计划单号"
|
|
|
|
+ width="100"
|
|
|
|
+ prop="productionPlanNo"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column label="批次号" prop="lotCode" align="center" />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="产品描述"
|
|
|
|
+ prop="productDescription"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="图纸版本"
|
|
|
|
+ width="80"
|
|
|
|
+ prop="technologyVersion"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="投产量"
|
|
|
|
+ width="100"
|
|
|
|
+ prop="productionQuantity"
|
|
|
|
+ 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="当前工段" width="100" prop="deptName" align="center"/>
|
|
|
|
- <el-table-column label="当前工序" width="120" prop="processAlias" align="center"/>
|
|
|
|
- <el-table-column label="回退" width="60" prop="isFallback" align="center">
|
|
|
|
|
|
+ label="下达日期"
|
|
|
|
+ prop="createTime"
|
|
|
|
+ width="100"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <dict-tag
|
|
|
|
- :options="yes_no"
|
|
|
|
- :value="scope.row.isFallback"
|
|
|
|
- />
|
|
|
|
|
|
+ <span>{{
|
|
|
|
+ proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
|
|
|
|
+ }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="废品回用" width="70" prop="isWasteRecycling" align="center">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="当前工段"
|
|
|
|
+ width="100"
|
|
|
|
+ prop="deptName"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="当前工序"
|
|
|
|
+ width="120"
|
|
|
|
+ prop="processAlias"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="回退"
|
|
|
|
+ width="60"
|
|
|
|
+ prop="isFallback"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <dict-tag
|
|
|
|
- :options="yes_no"
|
|
|
|
- :value="scope.row.isWasteRecycling"
|
|
|
|
- />
|
|
|
|
|
|
+ <dict-tag :options="yes_no" :value="scope.row.isFallback" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="母批号" prop="fromCode" align="center"/>
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
- fixed="right"
|
|
|
|
- label="操作"
|
|
|
|
- align="center"
|
|
|
|
- width="140px"
|
|
|
|
|
|
+ label="废品回用"
|
|
|
|
+ width="70"
|
|
|
|
+ prop="isWasteRecycling"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <dict-tag :options="yes_no" :value="scope.row.isWasteRecycling" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="母批号" prop="fromCode" align="center" />
|
|
|
|
+ <el-table-column
|
|
|
|
+ fixed="right"
|
|
|
|
+ label="操作"
|
|
|
|
+ align="center"
|
|
|
|
+ width="140px"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- icon="Delete"
|
|
|
|
- @click="handleDayworkWaste(scope.row)"
|
|
|
|
- >批废
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ link
|
|
|
|
+ type="danger"
|
|
|
|
+ icon="Delete"
|
|
|
|
+ @click="handleDayworkWaste(scope.row)"
|
|
|
|
+ >批废
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
|
|
+ <once-change ref="onceChangeRef" />
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
-import {
|
|
|
|
- getDayworkInfo
|
|
|
|
-} from "@/api/business/daywork.js";
|
|
|
|
-const {proxy} = getCurrentInstance();
|
|
|
|
|
|
+import { getDayworkInfo } from "@/api/business/daywork.js";
|
|
|
|
+import onceChange from "./onceSingleChangeDialog";
|
|
|
|
+import { ref } from "vue";
|
|
|
|
+const { proxy } = getCurrentInstance();
|
|
/** 字典数组区 */
|
|
/** 字典数组区 */
|
|
const { yes_no } = proxy.useDict("yes_no");
|
|
const { yes_no } = proxy.useDict("yes_no");
|
|
/** 表单抽屉 页变量 */
|
|
/** 表单抽屉 页变量 */
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
-const dayworkList = ref([])
|
|
|
|
|
|
+const ids = ref([]); //多选框选中数据
|
|
|
|
+const once = ref(true); //单批单改按钮是否可点击
|
|
|
|
+const multi = ref(true); //多批单改按钮是否可点击
|
|
|
|
+const dayworkList = ref([]);
|
|
const visible = ref(false);
|
|
const visible = ref(false);
|
|
|
|
+const formOpen = ref(false);
|
|
|
|
+
|
|
/** 查询对象 */
|
|
/** 查询对象 */
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -194,33 +241,45 @@ const queryParams = ref({
|
|
/*********************** 方法区 ****************************/
|
|
/*********************** 方法区 ****************************/
|
|
/** 打开抽屉 */
|
|
/** 打开抽屉 */
|
|
const open = (row) => {
|
|
const open = (row) => {
|
|
- console.log(row)
|
|
|
|
- queryParams.value.lineNumber = row.lineNumber
|
|
|
|
- queryParams.value.productionPlanNo = row.productionPlanNo
|
|
|
|
-
|
|
|
|
|
|
+ console.log(row);
|
|
|
|
+ queryParams.value.lineNumber = row.lineNumber;
|
|
|
|
+ queryParams.value.productionPlanNo = row.productionPlanNo;
|
|
|
|
|
|
//获取工段信息
|
|
//获取工段信息
|
|
- getDayworkList()
|
|
|
|
|
|
+ getDayworkList();
|
|
visible.value = true;
|
|
visible.value = true;
|
|
};
|
|
};
|
|
/**获取生产计划列表 */
|
|
/**获取生产计划列表 */
|
|
function getDayworkList() {
|
|
function getDayworkList() {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
- getDayworkInfo(queryParams.value).then(res => {
|
|
|
|
- if(res.code == 200) {
|
|
|
|
- dayworkList.value = res.rows
|
|
|
|
- loading.value = false
|
|
|
|
|
|
+ getDayworkInfo(queryParams.value).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ dayworkList.value = res.rows;
|
|
|
|
+ loading.value = false;
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/** 多选框选中数据 */
|
|
|
|
+function handleSelectionChange(selection) {
|
|
|
|
+ ids.value = selection.map((item) => item.lotCode);
|
|
|
|
+ console.log(selection);
|
|
|
|
+ once.value = ids.value.length == 1 ? false : true;
|
|
|
|
+ multi.value = ids.value.length > 1 ? false : true;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** 单批单改按钮操作 */
|
|
|
|
+function handleOnceSingleChange() {
|
|
|
|
+ proxy.$refs.onceChangeRef.open(ids.value[0]);
|
|
|
|
+}
|
|
|
|
+
|
|
/**搜索 */
|
|
/**搜索 */
|
|
function handleQuerydaywork() {
|
|
function handleQuerydaywork() {
|
|
- getDayworkList()
|
|
|
|
|
|
+ getDayworkList();
|
|
}
|
|
}
|
|
-/**批量删除 */
|
|
|
|
-function handleDelete() {
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
+/**批量删除 */
|
|
|
|
+function handleDelete() {}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 对话框关闭 事件
|
|
* 对话框关闭 事件
|
|
@@ -231,14 +290,14 @@ function close() {
|
|
|
|
|
|
/**搜索栏清空 */
|
|
/**搜索栏清空 */
|
|
function reset() {
|
|
function reset() {
|
|
- queryParams = ref({
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- lotCode: "",
|
|
|
|
- deptId: null,
|
|
|
|
- isFallback: "",
|
|
|
|
- isWasteRecycling: "",
|
|
|
|
-});
|
|
|
|
|
|
+ queryParams = ref({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ lotCode: "",
|
|
|
|
+ deptId: null,
|
|
|
|
+ isFallback: "",
|
|
|
|
+ isWasteRecycling: "",
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
/** 取消按钮 */
|
|
/** 取消按钮 */
|