huang_an hace 2 años
padre
commit
b6cb0d6f67

+ 7 - 1
src/api/warehouseManagement/outin.js

@@ -141,7 +141,13 @@ export default {
     }
   },
   updateOutInRecord: async (params) => {
-    const res = await request.post(`wms/outin/updateOutInRecord`, params);
+    const res = await request.post(`/wms/outin/updateOutInRecord`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  getDetailByCode: async (params) => {
+    const res = await request.post(`/wms/outin/getDetailByCode`, params);
     if (res.data.code == 0) {
       return res.data;
     }

+ 15 - 0
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -971,8 +971,23 @@
         row.tableData = uniqueItems;
         console.log(row);
         this.onSelectTableData(row.tableData, 1);
+
+        this.selectTop(row);
         this.$forceUpdate();
       },
+      async selectTop(row) {
+        let list = row.tableData;
+        let arr = [];
+        for (const it of list) {
+          arr.push({
+            categoryLevelId: it.rootCategoryLevelId,
+            code: it.code,
+            count: it.demandQuantity
+          });
+        }
+        const data = await getDetailByCode(arr);
+        console.log('===', data);
+      },
       handleEom() {
         this.$refs.eomRef.open();
       },

+ 1 - 1
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -174,7 +174,7 @@
                 ></el-table-column>
                 <el-table-column label="单价">
                   <template slot-scope="{ row }">
-                    {{ row.price ? row.price : '-' }}元/{{ row.weightUnit }}
+                    {{ row.price ? row.price : '-' }}元/{{ row.measuringUnit }}
                   </template>
                 </el-table-column>
                 <el-table-column

+ 1 - 1
src/views/warehouseManagement/stockManagement/details.vue

@@ -255,7 +255,7 @@
                   <template slot-scope="{ row }">
                     <template>
                       {{ row.price ? row.price : '-' + '元' }}/{{
-                        row.weightUnit
+                        row.measuringUnit
                       }}
                       <!-- {{ { yuan: '元', wanyuan: '万元' }[row.univalenceUnit] }} -->
                     </template>