Pārlūkot izejas kodu

1.物料流转。2.齐套叫料。

jiaxiaoqiang 1 gadu atpakaļ
vecāks
revīzija
1c5c0afe58

+ 34 - 35
src/views/material-flow/creatTask.vue

@@ -56,27 +56,27 @@
             @click="onEndBoxClick(index, item)"
           >
             <div class="name">{{ item.name }}</div>
-            <div
-              v-if="
-                item.targetType === 'stock' && index === currentDestinationIndex
-              "
-            >
-              <el-select
-                v-model="selectStore"
-                filterable
-                placeholder="请选择"
-                size="large"
-                style="width: 200px"
-                value-key="id"
-              >
-                <el-option
-                  v-for="store in storeMap.get(item.houseNo)"
-                  :key="store.id"
-                  :label="store.name"
-                  :value="store"
-                />
-              </el-select>
-            </div>
+            <!--            <div-->
+            <!--              v-if="-->
+            <!--                item.targetType === 'stock' && index === currentDestinationIndex-->
+            <!--              "-->
+            <!--            >-->
+            <!--              <el-select-->
+            <!--                v-model="selectStore"-->
+            <!--                filterable-->
+            <!--                placeholder="请选择"-->
+            <!--                size="large"-->
+            <!--                style="width: 200px"-->
+            <!--                value-key="id"-->
+            <!--              >-->
+            <!--                <el-option-->
+            <!--                  v-for="store in storeMap.get(item.houseNo)"-->
+            <!--                  :key="store.id"-->
+            <!--                  :label="store.name"-->
+            <!--                  :value="store"-->
+            <!--                />-->
+            <!--              </el-select>-->
+            <!--            </div>-->
           </div>
         </div>
         <el-button class="sureBtn" type="primary" @click="createTask"
@@ -94,10 +94,9 @@ import {
   getBoxDetailByLabel,
   getDestinationList,
   getMaterialInfoByLabel,
-  getStoreListByNo,
 } from "@/api/process/materialFlow";
 
-const currentBox = ref("ZJ000011");
+const currentBox = ref("");
 const boxDetail = ref<any>({});
 const enterBox = () => {
   getBoxDetailByLabel(currentBox.value).then((res) => {
@@ -107,7 +106,7 @@ const enterBox = () => {
 };
 
 // 物料
-const scanCodeInput = ref("2010100002301#gys022#sc022#100#20220929#31");
+const scanCodeInput = ref("");
 const materialList = ref<any>([]);
 
 const handleScanCodeInput = () => {
@@ -127,13 +126,13 @@ const onEndBoxClick = (index: number, item: any) => {
   currentDestination.value = item;
   currentDestinationIndex.value = index;
   // 如果是仓库,会根据仓库的no获取仓储的列表,存入map, 如果已经有数据了则不需要再次请求接口
-  if (item.targetType === "stock") {
-    if (!storeMap.has(item.houseNo)) {
-      getStoreListByNo(item.houseNo).then((res) => {
-        storeMap.set(item.houseNo, res.data || []);
-      });
-    }
-  }
+  // if (item.targetType === "stock") {
+  //   if (!storeMap.has(item.houseNo)) {
+  //     getStoreListByNo(item.houseNo).then((res) => {
+  //       storeMap.set(item.houseNo, res.data || []);
+  //     });
+  //   }
+  // }
 };
 
 onMounted(() => {
@@ -147,9 +146,9 @@ onMounted(() => {
 const createTask = () => {
   const params = {
     circulationDetail: [...materialList.value],
-    coordinate: "",
+    // coordinate: "",
     houseNo: "",
-    locationNo: "",
+    // locationNo: "",
     stationId: 0,
     targetType: "",
     vehicleCode: "",
@@ -159,8 +158,8 @@ const createTask = () => {
   params.targetType = currentDestination.value.targetType;
   if (currentDestination.value.targetType === "stock") {
     params.houseNo = currentDestination.value.houseNo;
-    params.locationNo = selectStore.value.locationNo;
-    params.coordinate = selectStore.value.coordinate;
+    // params.locationNo = selectStore.value.locationNo;
+    // params.coordinate = selectStore.value.coordinate;
   } else {
     params.stationId = currentDestination.value.id;
   }

+ 3 - 1
src/views/pro-operation/call-materiel/complete-suit.vue

@@ -69,7 +69,9 @@ const getSuitDetail = (box: any) => {
   boxSuitDetailByBoxId({ vehicleOperationId: box.id })
     .then((res) => {
       detailList.value = res.data;
-      materielBoxDetailRef.value?.showDialog(box, detailList.value, () => {});
+      materielBoxDetailRef.value?.showDialog(box, detailList.value, () => {
+        getList();
+      });
     })
     .finally(() => {
       isLoading.value = false;

+ 3 - 2
src/views/pro-operation/call-materiel/components/materiel-box-detail.vue

@@ -22,7 +22,7 @@
             </div>
             <div>
               <span class="item-count">{{ item?.num }}</span>
-              <span class="item-unit">{{ item?.unit }}</span>
+              <span class="item-unit">{{ item?.unit }}</span>
             </div>
           </div>
         </el-scrollbar>
@@ -64,7 +64,8 @@ const showDialog = (
 
 const sure = async () => {
   loading.value = true;
-  await outSuitBox({ vehicleOperationId: boxObj.value.id });
+  const res = await outSuitBox({ vehicleOperationId: boxObj.value.id });
+  ElMessage.success(res?.data ?? "操作成功");
   loading.value = false;
   callBack && callBack();
   visible.value = false;