huang_an 1 год назад
Родитель
Сommit
e2562f2378

+ 7 - 0
src/api/warehouseManagement/warehouseDefinition.js

@@ -164,5 +164,12 @@ export default {
     if (res.data.code == 0) {
       return res.data.data;
     }
+  },
+  // 调拨记录
+  allotRecord: async (data) => {
+    const res = await request.post(`/wms/allotRecord/page`, data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
   }
 };

+ 1 - 1
src/views/warehouseManagement/components/WareHouseDailog.vue

@@ -231,7 +231,7 @@
         this.locationList = [];
         this.tableList = [];
         console.log('===123', row);
-        if (row.houseList.length != 0) {
+        if (row.houseList?.length != 0) {
           this.row = row;
           this.idx = idx;
           this.visible = true;

+ 41 - 14
src/views/warehouseManagement/inventoryAllocation/components/inventory-search.vue

@@ -6,7 +6,7 @@
     @keyup.enter.native="search"
     @submit.native.prevent
   >
-    <el-row :gutter="15">
+    <!-- <el-row :gutter="15">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="单号:">
           <el-input clearable v-model="where.code" placeholder="请输入" />
@@ -43,6 +43,37 @@
 			 >重置</el-button>
 		</div>
       </el-col>
+    </el-row> -->
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物品:">
+          <el-input
+            clearable
+            v-model="where.name"
+            placeholder="请输入物品名称"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 18, md: 12 } : { span: 6 }">
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
+        </div>
+      </el-col>
     </el-row>
   </el-form>
 </template>
@@ -53,15 +84,12 @@
     data() {
       // 默认表单数据
       const defaultWhere = {
-        name: '',
-        code: '',
-        fixCode:'',
-        ownershipGroupId:''
+        name: ''
       };
       return {
         // 表单数据
         where: { ...defaultWhere },
-        treeData:[]
+        treeData: []
       };
     },
     computed: {
@@ -70,8 +98,7 @@
         return this.$store.state.theme.styleResponsive;
       }
     },
-    created(){
-    },
+    created() {},
     methods: {
       /* 搜索 */
       search() {
@@ -87,9 +114,9 @@
   };
 </script>
 <style lang="scss" scoped>
-    .ele-form-actions{
-		display:flex;
-		align-items: center;
-		justify-content: flex-end;
-	}
-</style>
+  .ele-form-actions {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+  }
+</style>

+ 157 - 142
src/views/warehouseManagement/inventoryAllocation/index.vue

@@ -1,36 +1,35 @@
 <template>
   <div class="ele-body">
-     <el-card shadow="never" v-loading="loading">
-	   <inventory-search @search="reload">
-	   </inventory-search>
-	   <!-- 数据表格 -->
-	   <ele-pro-table
-	     ref="table"
-	     :columns="columns"
-	     :datasource="datasource"
-	     cache-key="systemRoleTable"
-	   >
-	     <!-- 表头工具栏 -->
-	     <template v-slot:toolbar>
-			 <el-button
-			   size="small"
-			   type="primary"
-			   icon="el-icon-plus"
-			   class="ele-btn-icon"
-			   @click="addClick()"
-			 >
-			   新建
-			 </el-button>
-		   <el-button
-		     size="small"
-		     type="primary"
-		     class="ele-btn-icon"
-		     @click="goDetail()"
-		   >
-		     详情
-		   </el-button>
-	     </template>
-<!-- 	     <template v-slot:enable="{ row }">
+    <el-card shadow="never" v-loading="loading">
+      <inventory-search @search="reload"> </inventory-search>
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable"
+      >
+        <!-- 表头工具栏 -->
+        <!-- <template v-slot:toolbar>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="addClick()"
+          >
+            新建
+          </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            @click="goDetail()"
+          >
+            详情
+          </el-button>
+        </template> -->
+        <!-- 	     <template v-slot:enable="{ row }">
 	       <el-switch
 	         v-model="row.enable"
 	         active-color="#13ce66"
@@ -41,106 +40,127 @@
 	       >
 	       </el-switch>
 	     </template> -->
-		 <template v-slot:action="{ row }">
-		   <el-link
-		     type="primary"
-		     :underline="false"
-		     icon="el-icon-edit"
-		     @click="revocationRow(row)"
-		   >
-		     撤回
-		   </el-link>
-		 </template>
-	   </ele-pro-table>
-     </el-card>
-	 
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="revocationRow(row)"
+          >
+            撤回
+          </el-link>
+        </template>
+      </ele-pro-table>
+    </el-card>
   </div>
 </template>
 
 <script>
   import InventorySearch from './components/inventory-search.vue';
-  import { pageRoles } from '@/api/system/role'; 
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import { pageRoles } from '@/api/system/role';
   export default {
     components: {
       InventorySearch
     },
-    data () {
+    data() {
       return {
-		// 表格列配置
-		columns: [
-		  {
-		    columnKey: 'index',
-		    label: '序号',
-		    type: 'index',
-		    width: 55,
-		    align: 'center',
-		    showOverflowTooltip: true,
-		    fixed: 'left'
-		  },
-		  {
-		    prop: 'code',
-		    label: '单号',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'enable',
-		    label: '状态',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    slot: 'enable',
-		    minWidth: 110
-		  },
-			{
-			  prop: 'groupId',
-			  label: '计划单号',
-			  align: 'center',
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-		  {
-		    prop: 'name',
-		    label: '调拨类型',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'cycle',
-		    label: '调拨数量',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-			{
-			  prop: 'auto',
-			  label: '申请人',
-			  align: 'center',	
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-			  {
-				columnKey: 'action',
-				label: '操作',
-				width: 230,
-				align: 'center',
-				resizable: false,
-				slot: 'action',
-				showOverflowTooltip: true
-			  }
-		],
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'itemName',
+            label: '物品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'quantity',
+            label: '数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            slot: 'enable',
+            minWidth: 110
+          },
+          {
+            prop: 'weight',
+            label: '重量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'batchNo',
+            label: '批次',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'sourceWarehouse',
+            label: '来源仓库',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'targetWarehouse',
+            label: '目标仓库',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'allotName',
+            label: '调拨人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'createTime',
+            label: '调拨时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          }
+        ],
         // 加载状态
-        loading: false,
+        loading: false
       };
     },
-    computed: {
-
-    },
+    computed: {},
     methods: {
       /* 表格数据源 */
-      datasource({ page, limit, where, order }) {
-        return pageRoles({ pageNum: page, size: limit, ...where });
+      datasource({ page, limit, where }) {
+        return warehouseDefinition.allotRecord({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
       },
       async changeEnable(row) {
         const res = await putRoles(row);
@@ -157,33 +177,28 @@
       reload(where) {
         this.$refs.table.reload({ page: 1, where });
       },
-	  
-	  // 详情
-	  goDetail(){
-		  this.$router.push({
-		    path: '/warehouseManagement/inventoryAllocation/details',
-		    // query: {
-		    //   id
-		    // }
-		  })
-	  },
-	  
-	  // 新增
-	  addClick(){
-		 this.$router.push({
-		   path: '/warehouseManagement/inventoryAllocation/add'
-		 }) 
-	  },
-	  
-	  // 撤回
-	  revocationRow(row){
-		  
-	  }
-	  
+
+      // 详情
+      goDetail() {
+        this.$router.push({
+          path: '/warehouseManagement/inventoryAllocation/details'
+          // query: {
+          //   id
+          // }
+        });
+      },
+
+      // 新增
+      addClick() {
+        this.$router.push({
+          path: '/warehouseManagement/inventoryAllocation/add'
+        });
+      },
+
+      // 撤回
+      revocationRow(row) {}
     }
   };
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>

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

@@ -763,8 +763,6 @@
         }
       },
       clientEnvironmentId() {
-        console.log('--------------------------');
-        debugger;
         return this.$store.state.user.info.clientEnvironmentId;
       }
     },

+ 32 - 1
src/views/warehouseManagement/stockManagement/add_export.vue

@@ -130,6 +130,12 @@
           <!-- <el-button v-if="!isOutsourcing" type="primary" @click="addStock"
             >添加</el-button
           > -->
+          <el-button
+            :disabled="multipleSelection.length == 0"
+            type="primary"
+            @click="handleWareHouse"
+            >批量设置货位</el-button
+          >
         </header-title>
 
         <div class="mt10 form-table">
@@ -156,8 +162,16 @@
               :data="warehousingMaterialList"
               tooltip-effect="dark"
               style="width: 100%"
+              @selection-change="selectChange"
               stripe
             >
+              <el-table-column
+                fixed="left"
+                align="center"
+                type="selection"
+                width="55"
+              >
+              </el-table-column>
               <el-table-column
                 label="序号"
                 type="index"
@@ -830,6 +844,7 @@
           createUserId: '',
           remark: ''
         },
+        multipleSelection: [],
         rules: {
           'extInfo.assetType': {
             required: true,
@@ -872,6 +887,9 @@
       this.initData();
     },
     methods: {
+      selectChange(val) {
+        this.multipleSelection = val;
+      },
       wrapHandleScroll() {
         console.log('---------wrapHandleScroll------------');
         if (
@@ -2726,7 +2744,20 @@
       },
       houseData(argum, idx) {
         console.log(argum);
-        this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
+        if (idx > -1) {
+          this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
+        } else {
+          let ids = this.multipleSelection.map((item) => item.id);
+          this.warehousingMaterialList.forEach((item, index) => {
+            if (ids.includes(item.id)) {
+              this.$set(
+                this.warehousingMaterialList[index],
+                'houseList',
+                argum
+              );
+            }
+          });
+        }
       }
     },
 

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

@@ -103,7 +103,7 @@
           <el-button icon="el-icon-plus" type="primary" @click="add"
             >新建</el-button
           >
-          <!-- v-if="clientEnvironmentId == 2" -->
+          <!-- v-if="clientEnvironmentId == 4" -->
           <el-button
             icon="el-icon-plus"
             v-if="clientEnvironmentId == 4"