|
@@ -14,8 +14,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
- <el-button class="call-btn" round type="primary" @click="toCall"
|
|
|
- >叫料
|
|
|
+ <el-button
|
|
|
+ v-if="!isFull"
|
|
|
+ class="call-btn"
|
|
|
+ round
|
|
|
+ type="primary"
|
|
|
+ @click="toCall"
|
|
|
+ >
|
|
|
+ 叫料
|
|
|
</el-button>
|
|
|
|
|
|
<MarterielBoxDetail ref="materielBoxDetailRef" />
|
|
@@ -24,12 +30,16 @@
|
|
|
<script lang="ts" setup>
|
|
|
import MarterielBoxDetail from "@/views/pro-operation/call-materiel/components/materiel-box-detail.vue";
|
|
|
|
|
|
-import { boxSuitDetailByBoxId, boxSuitList } from "@/api/process/callMateriel";
|
|
|
+import {
|
|
|
+ boxSuitDetailByBoxId,
|
|
|
+ boxSuitList,
|
|
|
+ callNotFullSuit,
|
|
|
+} from "@/api/process/callMateriel";
|
|
|
import { useProcessStore } from "@/store/modules/processView";
|
|
|
|
|
|
const processStore = useProcessStore();
|
|
|
const merterielBoxes = ref<any[]>([]);
|
|
|
-
|
|
|
+const isFull = ref(false); //是否齐套了
|
|
|
const isLoading = ref(false);
|
|
|
|
|
|
const getList = () => {
|
|
@@ -37,12 +47,10 @@ const getList = () => {
|
|
|
boxSuitList({
|
|
|
operationId: processStore.odersData.operationId,
|
|
|
workOrderCode: processStore.odersData.workOrderCode,
|
|
|
- isFull: true,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- merterielBoxes.value = res.data;
|
|
|
- merterielBoxes.value = res.data;
|
|
|
- merterielBoxes.value = res.data;
|
|
|
+ merterielBoxes.value = res.data.processVehicleList || [];
|
|
|
+ isFull.value = res.data.isFull;
|
|
|
})
|
|
|
.finally(() => {
|
|
|
isLoading.value = false;
|
|
@@ -68,7 +76,20 @@ const getSuitDetail = (box: any) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-const toCall = () => {};
|
|
|
+const toCall = () => {
|
|
|
+ isLoading.value = true;
|
|
|
+ callNotFullSuit({
|
|
|
+ operationId: processStore.odersData.operationId,
|
|
|
+ workOrderCode: processStore.odersData.workOrderCode,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ res.data && ElMessage.success(res.data);
|
|
|
+ // getList();
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ isLoading.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|