|
@@ -48,6 +48,7 @@
|
|
<el-form-item label="工段:">
|
|
<el-form-item label="工段:">
|
|
<el-select-v2
|
|
<el-select-v2
|
|
v-model="queryParams.deptId"
|
|
v-model="queryParams.deptId"
|
|
|
|
+ clearable
|
|
:options="deptList"
|
|
:options="deptList"
|
|
placeholder="请选择工段"
|
|
placeholder="请选择工段"
|
|
style="width: 140px"
|
|
style="width: 140px"
|
|
@@ -55,13 +56,32 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="工序:">
|
|
<el-form-item label="工序:">
|
|
<el-select-v2
|
|
<el-select-v2
|
|
- v-model="processAlias"
|
|
|
|
|
|
+ v-model="queryParams.processId"
|
|
|
|
+ clearable
|
|
:options="processList"
|
|
:options="processList"
|
|
placeholder="请选择工序"
|
|
placeholder="请选择工序"
|
|
style="width: 140px"
|
|
style="width: 140px"
|
|
- @change="handleProcessChange"
|
|
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="标识:">
|
|
|
|
+ <el-select
|
|
|
|
+ style="width: 160px"
|
|
|
|
+ multiple
|
|
|
|
+ v-model="queryParams.flags"
|
|
|
|
+ collapse-tags
|
|
|
|
+ collapse-tags-tooltip
|
|
|
|
+ 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>
|
|
<el-form-item>
|
|
<el-button type="info" icon="Search" @click="handleQuerydaywork"
|
|
<el-button type="info" icon="Search" @click="handleQuerydaywork"
|
|
>搜索</el-button
|
|
>搜索</el-button
|
|
@@ -100,7 +120,7 @@
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
v-hasPermi="['business:productionPlan:query']"
|
|
v-hasPermi="['business:productionPlan:query']"
|
|
- @click="handleColumnClick(scope.row)"
|
|
|
|
|
|
+ @click="handleColumnClick(scope.row.lotCode)"
|
|
><span>{{ scope.row.lotCode }}</span></el-button
|
|
><span>{{ scope.row.lotCode }}</span></el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
@@ -146,24 +166,37 @@
|
|
prop="processAlias"
|
|
prop="processAlias"
|
|
align="center"
|
|
align="center"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
- label="废品回用"
|
|
|
|
- width="70"
|
|
|
|
- prop="isWasteRecycling"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="标识" width="300" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <dict-tag :options="yes_no" :value="scope.row.isWasteRecycling" />
|
|
|
|
|
|
+ <el-tag
|
|
|
|
+ v-if="scope.row.isWaste == 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="primary"
|
|
|
|
+ >{{ "废品回用" }}</el-tag
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="批废"
|
|
|
|
- width="70"
|
|
|
|
- prop="isWaste"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="母批号" prop="fromCode" align="center" >
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <dict-tag :options="yes_no" :value="scope.row.isWaste" />
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="primary"
|
|
|
|
+ width="150px"
|
|
|
|
+ @click="handleColumnClick(scope.row.fromCode)"
|
|
|
|
+ ><span>{{ scope.row.fromCode }}</span></el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -172,11 +205,11 @@
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
-import { getProducedLot, getDeptList } from "@/api/business/daywork.js";
|
|
|
|
|
|
+import { getProducedLot, getDeptList,getItemProcess } from "@/api/business/daywork.js";
|
|
import router from "@/router";
|
|
import router from "@/router";
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
/** 字典数组区 */
|
|
/** 字典数组区 */
|
|
-const { yes_no } = proxy.useDict("yes_no");
|
|
|
|
|
|
+const { is_identification } = proxy.useDict("is_identification");
|
|
/** 表单抽屉 页变量 */
|
|
/** 表单抽屉 页变量 */
|
|
const currentProductionPlan = ref({});
|
|
const currentProductionPlan = ref({});
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
@@ -184,7 +217,6 @@ const lotList = ref([]);
|
|
const lotInfo = ref([]);
|
|
const lotInfo = ref([]);
|
|
const visible = ref(false);
|
|
const visible = ref(false);
|
|
const processList = ref([]);
|
|
const processList = ref([]);
|
|
-const processAlias = ref(null);
|
|
|
|
const deptList = ref([]);
|
|
const deptList = ref([]);
|
|
/** 查询对象 */
|
|
/** 查询对象 */
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
@@ -192,6 +224,7 @@ const queryParams = ref({
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
lotCode: "",
|
|
lotCode: "",
|
|
deptId: null,
|
|
deptId: null,
|
|
|
|
+ processId:null,
|
|
});
|
|
});
|
|
const queryDeptParams = ref({
|
|
const queryDeptParams = ref({
|
|
lineNumber: "",
|
|
lineNumber: "",
|
|
@@ -214,58 +247,35 @@ const open = (row) => {
|
|
console.log("deptList", deptList);
|
|
console.log("deptList", deptList);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ getItemProcess(queryParams.value).then((response) => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ processList.value = response.data;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
//获取工段信息
|
|
//获取工段信息
|
|
getProducedLotList();
|
|
getProducedLotList();
|
|
visible.value = true;
|
|
visible.value = true;
|
|
};
|
|
};
|
|
/** 打开批次详情页 */
|
|
/** 打开批次详情页 */
|
|
-function handleColumnClick(row) {
|
|
|
|
- router.push({ path: "/reviseBath/lotFormParticulars/" + row.lotCode });
|
|
|
|
|
|
+function handleColumnClick(lotCode) {
|
|
|
|
+ router.push({ path: "/reviseBath/lotFormParticulars/" + lotCode });
|
|
}
|
|
}
|
|
/**获取生产计划列表 */
|
|
/**获取生产计划列表 */
|
|
function getProducedLotList() {
|
|
function getProducedLotList() {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
- processAlias.value = null;
|
|
|
|
getProducedLot(queryParams.value).then((res) => {
|
|
getProducedLot(queryParams.value).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
lotList.value = res.rows;
|
|
lotList.value = res.rows;
|
|
lotInfo.value = res.rows;
|
|
lotInfo.value = res.rows;
|
|
- res.rows.forEach((item) => {
|
|
|
|
- // 如果 processList 中不存在当前 processAlias,则添加到 processList 中
|
|
|
|
- if (
|
|
|
|
- !processList.value.find(
|
|
|
|
- (process) => process.label === item.processAlias
|
|
|
|
- )
|
|
|
|
- ) {
|
|
|
|
- // 计算当前 processAlias 的唯一递增值
|
|
|
|
- const count = processList.value.length;
|
|
|
|
- processList.value.push({
|
|
|
|
- label: item.processAlias,
|
|
|
|
- value: count,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- console.log(processList.value);
|
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-/**工序切换 */
|
|
|
|
-function handleProcessChange() {
|
|
|
|
- console.log(processList.value[processAlias.value].label);
|
|
|
|
- // 使用 some 方法检查是否存在于 processList 中
|
|
|
|
- lotList.value = lotInfo.value.filter((item) => {
|
|
|
|
- // 检查当前对象的 processAlias 是否等于目标值
|
|
|
|
- return item.processAlias == processList.value[processAlias.value].label;
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
|
|
|
|
/**搜索 */
|
|
/**搜索 */
|
|
function handleQuerydaywork() {
|
|
function handleQuerydaywork() {
|
|
getProducedLotList();
|
|
getProducedLotList();
|
|
}
|
|
}
|
|
-/**查看 */
|
|
|
|
-function handleChecklot(row) {}
|
|
|
|
/**
|
|
/**
|
|
* 对话框关闭 事件
|
|
* 对话框关闭 事件
|
|
*/
|
|
*/
|