|
@@ -20,6 +20,24 @@
|
|
|
label-width="auto"
|
|
|
size="large"
|
|
|
>
|
|
|
+ <el-select
|
|
|
+ v-if="processStore.scanInfo.batchReport == 1"
|
|
|
+ v-model="selectedProcess"
|
|
|
+ :filterable="true"
|
|
|
+ multiple
|
|
|
+ placeholder="请选择流转卡号,可以输入或者扫码筛选"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ >
|
|
|
+ <template #prefix
|
|
|
+ ><img src="@/assets/icons/shaoma.svg"
|
|
|
+ /></template>
|
|
|
+ <el-option
|
|
|
+ v-for="item in processList"
|
|
|
+ :key="item"
|
|
|
+ :label="item"
|
|
|
+ :value="item"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
<el-row
|
|
|
v-for="(per, index) in persons"
|
|
|
:key="per.userName"
|
|
@@ -85,8 +103,8 @@
|
|
|
<template #footer>
|
|
|
<div class="bottom-btns">
|
|
|
<el-button class="cancelBtn el-button-big" @click="cancelClick"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
+ >取消
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-if="!formDisabled"
|
|
|
class="sureBtn el-button-big"
|
|
@@ -102,7 +120,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { useProcessStore } from "@/store/modules/processView";
|
|
|
import { useDictionaryStore } from "@/store/modules/dictionary";
|
|
|
-import { getProcessInfo } from "@/api/prosteps";
|
|
|
+import { getProcessInfo, getunProcessedList } from "@/api/prosteps";
|
|
|
import { emitter, EventsNames } from "@/utils/common";
|
|
|
import { CirclePlus, Remove } from "@element-plus/icons-vue";
|
|
|
import { useUserStore } from "@/store/modules/user";
|
|
@@ -127,6 +145,7 @@ const persons = ref<
|
|
|
>([{ userName: userStore.user.username ?? "", workingHoursRate: 100 }]);
|
|
|
|
|
|
const openReportWorkDrawer = () => {
|
|
|
+ selectedProcess.value = []; //需要清空已经选择的流转卡号
|
|
|
getProcessInfo(processStore.scanInfo.id).then((res) => {
|
|
|
processStore.scanInfo.currentState = res.data.currentState;
|
|
|
if (res.data.currentState !== "start") {
|
|
@@ -140,6 +159,12 @@ const openReportWorkDrawer = () => {
|
|
|
formDisabled.value = false;
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ if (processStore.scanInfo.batchReport === 1) {
|
|
|
+ getunProcessedList(processStore.scanInfo.id).then((res: any) => {
|
|
|
+ processList.value = res.data ?? [];
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const cancelClick = () => {
|
|
@@ -159,6 +184,7 @@ const confirmClick = () => {
|
|
|
let params = {
|
|
|
processId: processStore.scanInfo.id,
|
|
|
processUserReportList: persons.value,
|
|
|
+ seqList: selectedProcess.value,
|
|
|
};
|
|
|
|
|
|
reportWork(params).then((res: any) => {
|
|
@@ -189,6 +215,10 @@ const rateArray: { label: string; value: number }[] = [
|
|
|
{ label: "90%", value: 90 },
|
|
|
{ label: "100%", value: 100 },
|
|
|
];
|
|
|
+
|
|
|
+// ================= 选择工序相关
|
|
|
+const selectedProcess = ref<any[]>([]);
|
|
|
+const processList = ref<any[]>([]);
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|