浏览代码

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wms into test

yusheng 10 月之前
父节点
当前提交
9bfcffcc95

+ 155 - 89
src/views/warehouseManagement/components/WarehousingDialog.vue

@@ -1,12 +1,26 @@
 <template>
-  <el-dialog :visible.sync="visible" title="仓库" @before-close="cancel" width="50%" :close-on-click-modal="false">
+  <el-dialog
+    :visible.sync="visible"
+    title="仓库"
+    @before-close="cancel"
+    width="50%"
+    :close-on-click-modal="false"
+  >
     <el-form :model="formData" label-width="100px">
       <el-row>
         <el-col :span="8">
           <el-form-item label="选择仓库">
-            <el-select filterable v-model="warehouseId" @change="changeWarehouse">
-              <el-option v-for="(item, index) in warehouseList" :key="index" :label="item.name"
-                :value="item.id"></el-option>
+            <el-select
+              filterable
+              v-model="warehouseId"
+              @change="changeWarehouse"
+            >
+              <el-option
+                v-for="(item, index) in warehouseList"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
             </el-select>
           </el-form-item>
         </el-col>
@@ -17,13 +31,15 @@
           <el-form-item label="总包装数量">
             <span class="red_color">
               {{ this.packingQuantity }}
-            </span></el-form-item>
+            </span></el-form-item
+          >
         </el-col>
         <el-col :span="6">
           <el-form-item label="计量数量">
             <span class="red_color">
               {{ this.measureQuantity }}
-            </span></el-form-item>
+            </span></el-form-item
+          >
         </el-col>
       </el-row>
     </el-form>
@@ -31,19 +47,31 @@
     <el-table :data="tableDate" style="width: 100%">
       <el-table-column label="序号" type="index"></el-table-column>
       <el-table-column label="仓库名称" prop="warehouseName"></el-table-column>
-      <el-table-column label="包装数量" prop="packingQuantity" >
+      <el-table-column label="包装数量" prop="packingQuantity">
         <template slot-scope="{ row, $index }">
-          <el-input-number v-model="row.packingQuantity" :min="0" size="mini" disabled></el-input-number>
+          <el-input-number
+            v-model="row.packingQuantity"
+            :min="0"
+            size="mini"
+            disabled
+          ></el-input-number>
         </template>
       </el-table-column>
-      <el-table-column label="计量数量" prop="measureQuantity" >
+      <el-table-column label="计量数量" prop="measureQuantity">
         <template slot-scope="{ row, $index }">
-          <el-input-number v-model="row.measureQuantity" :min="0" size="mini" disabled></el-input-number>
+          <el-input-number
+            v-model="row.measureQuantity"
+            :min="0"
+            size="mini"
+            disabled
+          ></el-input-number>
         </template>
       </el-table-column>
       <el-table-column width="120" label="操作" fixed="right">
         <template slot-scope="{ row, $index }">
-          <el-button type="text" @click="delItem($index)" size="small">删除</el-button>
+          <el-button type="text" @click="delItem($index)" size="small"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -55,46 +83,46 @@
 </template>
 
 <script>
-import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
-export default {
-  data() {
-    return {
-      packingQuantity: 0,
-      tableDate: [],
-      visible: false,
-      warehouseList: [], //仓库
-      formData: {},
-      warehouseId: '',
-      currentIndex: 0,
-      measureQuantity: 0
-    };
-  },
-  methods: {
-    changeWarehouse() {
-      this.tableDate = []
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  export default {
+    data() {
+      return {
+        packingQuantity: 0,
+        tableDate: [],
+        visible: false,
+        warehouseList: [], //仓库
+        formData: {},
+        warehouseId: '',
+        currentIndex: 0,
+        measureQuantity: 0
+      };
     },
-    cancel() {
-      this.visible = false;
-    },
-    handleSelect() {
-      if (this.tableDate.length == 0) {
-        return this.$message.warning('请添加仓库!');
-      }
-      let total = this.tableDate.reduce(
-        (total, currentObj) =>
-          Number(total) + Number(currentObj.packingQuantity),
-        0
-      );
-      if (total == this.packingQuantity) {
-        console.log(this.tableDate,'kkkkkkkkkkkkkkkkkkkkkkkkkkkkk');
-        this.$emit('selection', this.tableDate, this.currentIndex);
+    methods: {
+      changeWarehouse() {
+        this.tableDate = [];
+      },
+      cancel() {
         this.visible = false;
-      } else {
-        this.$message.warning('总包装数量与仓库包装数量不一致!');
-      }
-    },
-    addTableData() {
-      // if (this.tableDate.length < this.packingQuantity) {
+      },
+      handleSelect() {
+        if (this.tableDate.length == 0) {
+          return this.$message.warning('请添加仓库!');
+        }
+        let total = this.tableDate.reduce(
+          (total, currentObj) =>
+            Number(total) + Number(currentObj.packingQuantity),
+          0
+        );
+        if (total == this.packingQuantity) {
+          console.log(this.tableDate, 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkk');
+          this.$emit('selection', this.tableDate, this.currentIndex);
+          this.visible = false;
+        } else {
+          this.$message.warning('总包装数量与仓库包装数量不一致!');
+        }
+      },
+      addTableData() {
+        // if (this.tableDate.length < this.packingQuantity) {
         let list = this.tableDate.filter(
           (item) => item.warehouseId == this.warehouseId
         );
@@ -110,51 +138,89 @@ export default {
           )[0].name,
           warehouseId: this.warehouseId
         });
-      // } else {
-      //   this.$message.warning('请维护包装规格后再添加仓库!');
-      // }
-    },
-    delItem(index) {
-      // if (index == 0 && this.tableDate.length == 1) {
-      //   return this.$message.warning('请至少保存一条数据!');
-      // }
-      this.tableDate.splice(index, 1);
-    },
-    async getWarehouseList(categoryType) {
-      const res = await warehouseDefinition.list({ inventoryType: categoryType });
-      console.log(res);
-      this.warehouseList = res.map((item) => {
-        return { ...item, name: item.name };
-      });
-    },
-    open(packingQuantity, measureQuantity,idx, warehouseId, warehouseName, categoryType) {
-      console.log('仓库id', packingQuantity, measureQuantity, warehouseId, warehouseName);
+        // } else {
+        //   this.$message.warning('请维护包装规格后再添加仓库!');
+        // }
+      },
+      delItem(index) {
+        // if (index == 0 && this.tableDate.length == 1) {
+        //   return this.$message.warning('请至少保存一条数据!');
+        // }
+        this.tableDate.splice(index, 1);
+      },
+      async getWarehouseList(categoryType) {
+        const res = await warehouseDefinition.list({
+          inventoryType: categoryType
+        });
+        this.warehouseList = res.map((item) => {
+          return { ...item, name: item.name };
+        });
+      },
+      async getBatchWarehouseList(batch) {
+        const res = await warehouseDefinition.list({});
+        if (!batch.length) {
+          this.warehouseList = res.map((item) => {
+            return { ...item, name: item.name };
+          });
+          return;
+        }
 
-      this.warehouseId = '';
-      this.tableDate = [];
-      this.currentIndex = idx;
-      this.packingQuantity = packingQuantity;
-      this.measureQuantity = measureQuantity;
-      this.visible = true;
-      this.getWarehouseList(categoryType);
-      if (warehouseId && warehouseName) {
-        this.warehouseId = warehouseId;
-        this.tableDate.push({
-          packingQuantity: packingQuantity,
-          measureQuantity: measureQuantity,
-          warehouseName: warehouseName,
-          warehouseId: warehouseId
+        let filter = res.filter((item) => batch.includes(item.inventoryType));
+        this.warehouseList = filter.map((item) => {
+          return { ...item, name: item.name };
         });
+      },
+      open({
+        packingQuantity,
+        measureQuantity,
+        idx,
+        warehouseId,
+        warehouseName,
+        categoryType,
+        batch
+      } = obj) {
+        console.log(
+          '仓库id',
+          packingQuantity,
+          measureQuantity,
+          warehouseId,
+          warehouseName
+        );
+
+        this.warehouseId = '';
+        this.tableDate = [];
+        this.currentIndex = idx;
+        this.packingQuantity = packingQuantity;
+        this.measureQuantity = measureQuantity;
+        this.visible = true;
+
+        console.log(batch);
+
+        if (!batch) {
+          this.getWarehouseList(categoryType);
+        } else {
+          this.getBatchWarehouseList(batch);
+        }
+
+        // this.getWarehouseList(categoryType);
+        if (warehouseId && warehouseName) {
+          this.warehouseId = warehouseId;
+          this.tableDate.push({
+            packingQuantity: packingQuantity,
+            measureQuantity: measureQuantity,
+            warehouseName: warehouseName,
+            warehouseId: warehouseId
+          });
+        }
       }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.red_color {
-  font-size: 20px;
-  font-weight: bold;
-  color: red;
-}
+  .red_color {
+    font-size: 20px;
+    font-weight: bold;
+    color: red;
+  }
 </style>

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

@@ -1054,6 +1054,23 @@
         }
         this.formData.extInfo.createUserName = info.name;
         this.formData.createUserId = info.userId;
+
+        // 默认领料人部门
+        console.log(info);
+
+        // this.formData.extInfo.verifyDeptCode = info?.groupId;
+        // this.formData.extInfo.verifyDeptName = info?.groupName;
+        // this.$set(this.formData.extInfo, 'verifyDeptCode', info?.groupId);
+        // this.$set(this.formData.extInfo, 'verifyDeptName', info?.groupName);
+
+        // // // 领料人
+        // this.getStaffList({ id: info?.groupId });
+        // this.formData.fromId = info.userId;
+        // this.formData.fromUser = info.name;
+        // this.formData.fromUserPhone = info.phone;
+        // this.$set(this.formData, 'fromId', info.userId);
+        // this.$set(this.formData, 'fromUser', info.name);
+        // this.$set(this.formData, 'fromUserPhone', info.phone);
       },
       // 初始化部门数据
       async initDeptData() {

+ 8 - 4
src/views/warehouseManagement/statisticalReports/transceiverDetails/add.vue

@@ -5,9 +5,9 @@
     :title="isView ? '查看收发明细表明细' : '选择收发明细表明细'"
     width="90vw"
   >
-    <el-card shadow="never">
+    <el-card shadow="never" style="height: 70vh">
       <!-- 数据表格 -->
-      <div>
+      <div >
         <el-form
           label-position="left"
           class="ele-form-search"
@@ -90,8 +90,8 @@
         :needPage="!isView"
         :columns="columns"
         :datasource="datasource"
-        height="calc(100vh - 405px)"
-        full-height="calc(100vh - 116px)"
+        height="calc(100% - 305px)"
+        full-height="calc(100vh - 56px)"
         tool-class="ele-toolbar-form"
         style="margin-top: 18px"
       >
@@ -459,4 +459,8 @@
       justify-content: flex-end;
     }
   }
+
+  :deep(.table) {
+    height: calc(100% - 100px);
+  }
 </style>

+ 2 - 2
src/views/warehouseManagement/statisticalReports/transceiverSummary/index.vue

@@ -89,14 +89,14 @@
           },
           {
             prop: 'categoryCode',
-            label: '件号',
+            label: '编码',
             align: 'center',
             width: 180,
             showOverflowTooltip: true
           },
           {
             prop: 'categoryName',
-            label: '名',
+            label: '名',
             align: 'center',
             width: 180,
             showOverflowTooltip: true

+ 3 - 2
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -267,7 +267,7 @@
         searchForm: {
           dimension: '1'
         },
-        selectedDime: '1',
+        selectedDime: '2',
 
         diffCacheKeyUrl:
           'eos-439decaa-warehouseManagement-stockLedger-products',
@@ -338,7 +338,8 @@
                 prop: 'inventoryCycle',
                 label: '存货周期(天)',
                 align: 'center',
-                width: 120,
+                width: 150,
+                sortable: true,
                 showOverflowTooltip: true
               }
             : '',

+ 37 - 31
src/views/warehouseManagement/stockManagement/add.vue

@@ -166,7 +166,7 @@
                   v-if="productList.length != 0"
                   type="success"
                   plain
-                  style=" float: right; margin-right: 20px"
+                  style="float: right; margin-right: 20px"
                   size="mini"
                   @click="batchSave"
                   >批量保存</el-button
@@ -175,7 +175,7 @@
                   v-if="productList.length != 0"
                   type="success"
                   plain
-                  style=" float: right; margin-right: 20px"
+                  style="float: right; margin-right: 20px"
                   size="mini"
                   @click="handleWareHouse(productList, '', 'batch')"
                   >批量选择仓库</el-button
@@ -3240,14 +3240,14 @@
               if (row.measureUnit == row.packingUnit) {
                 let pNum = 0;
                 let mNum = row.measureQuantity;
-                this.$refs.wareHouseDailogRef.open(
-                  pNum,
-                  mNum,
+                this.$refs.wareHouseDailogRef.open({
+                  packingQuantity: pNum,
+                  measureQuantity: mNum,
                   idx,
-                  row.warehouseId,
-                  row.warehouseName + '',
-                  row.categoryLevelPathIdParent
-                );
+                  warehouseId: row.warehouseId,
+                  warehouseName: row.warehouseName + '',
+                  categoryType: row.categoryLevelPathIdParent
+                });
               } else {
                 if (row.packingSpecificationOption[1]?.packageCell) {
                   let num = row.packingQuantity;
@@ -3263,23 +3263,23 @@
                       14
                     );
                   }
-                  this.$refs.wareHouseDailogRef.open(
-                    num,
-                    row.measureQuantity,
+                  this.$refs.wareHouseDailogRef.open({
+                    packingQuantity: num,
+                    measureQuantity: row.measureQuantity,
                     idx,
-                    row.warehouseId,
-                    row.warehouseName + '',
-                    row.categoryLevelPathIdParent
-                  );
+                    warehouseId: row.warehouseId,
+                    warehouseName: row.warehouseName + '',
+                    categoryType: row.categoryLevelPathIdParent
+                  });
                 } else {
-                  this.$refs.wareHouseDailogRef.open(
-                    num,
-                    row.measureQuantity,
+                  this.$refs.wareHouseDailogRef.open({
+                    packingQuantity: num,
+                    measureQuantity: row.measureQuantity,
                     idx,
-                    row.warehouseId,
-                    row.warehouseName + '',
-                    row.categoryLevelPathIdParent
-                  );
+                    warehouseId: row.warehouseId,
+                    warehouseName: row.warehouseName + '',
+                    categoryType: row.categoryLevelPathIdParent
+                  });
                 }
               }
             } else {
@@ -3297,14 +3297,14 @@
               );
               console.log(num);
 
-              this.$refs.wareHouseDailogRef.open(
-                num,
-                row.measureQuantity,
+              this.$refs.wareHouseDailogRef.open({
+                packingQuantity: num,
+                measureQuantity: row.measureQuantity,
                 idx,
-                row.warehouseId,
-                row.warehouseName + '',
-                row.categoryLevelPathIdParent
-              );
+                warehouseId: row.warehouseId,
+                warehouseName: row.warehouseName + '',
+                categoryType: row.categoryLevelPathIdParent
+              });
             }
           } else {
             this.$message.error('请先填写包装数量!');
@@ -3335,7 +3335,13 @@
             return sum;
           }, 0);
           // 打开仓库选择弹窗
-          this.$refs.wareHouseDailogRef.open(totalPacking, mNum);
+
+          this.$refs.wareHouseDailogRef.open({
+            packingQuantity: totalPacking,
+            measureQuantity: mNum,
+            batch: this.formData.extInfo.assetType
+          });
+          // this.$refs.wareHouseDailogRef.open(totalPacking, mNum);
         }
       },
       calculateRequiredWarehouseNum(row) {