huang_an 2 lat temu
rodzic
commit
9dfebc60f8

+ 3 - 0
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -179,6 +179,9 @@
         this.visible = false;
       },
       handleSelectionChange(val) {
+        for (const key in val) {
+          val[key].categoryId = val[key].id;
+        }
         this.selectionList = val;
       },
       handleNodeClick(data) {

+ 11 - 7
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -831,7 +831,7 @@
             ) {
               return this.$message.error('请完善出库明细数据!');
             }
-            console.log(this.warehousingMaterialList);
+            console.log('qqqq===>', this.warehousingMaterialList);
             let arr = this.warehousingMaterialList.map((item) => {
               return {
                 batchNo: item.batchNo,
@@ -874,6 +874,9 @@
               }
             });
             let obj = { ...this.formData, type: 2 };
+            for (const key in arr) {
+              arr[key].count = arr[key].outInNum;
+            }
             obj.outInDetailAddPOList = arr;
 
             this.saveLoading = true;
@@ -938,13 +941,14 @@
       },
       //添加明细
       onSelectTableData(val, e) {
-        if (e == 1) {
-          this.llList = val;
-        } else {
-          this.llList = [];
-        }
+        // if (e == 1) {
+        //   this.llList = val;
+        // } else {
+        //   this.llList = [];
+        // }
+        // .concat(this.llList)
         if (this.warehousingMaterialList.length != 0) {
-          val = this.warehousingMaterialList.concat(val).concat(this.llList);
+          val = this.warehousingMaterialList.concat(val);
         }
         this.onSelectTableDataVal = val;
         this.warehousingMaterialList = val.map((next) => {

+ 28 - 2
src/views/warehouseManagement/outgoingManagement/components/pickOrder.vue

@@ -21,7 +21,11 @@
           <!-- 表头工具栏 -->
           <template v-slot:code="{ row }">
             <!-- @click="details(row)" -->
-            <el-link type="primary" :underline="false">
+            <el-link
+              type="primary"
+              @click="pickOrderEdit(row)"
+              :underline="false"
+            >
               {{ row.code }}
             </el-link>
           </template>
@@ -30,6 +34,10 @@
               ><i></i
             ></el-radio>
           </template>
+          <template v-slot:status="{ row }">
+            <span v-if="row.status == 0">未领料</span>
+            <span v-else>已领料</span>
+          </template>
         </ele-pro-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -37,12 +45,16 @@
         <el-button type="primary" @click="handleMine">确 定</el-button>
       </span>
     </el-dialog>
+
+    <pickOrderEdit ref="pickOrderEditRef" />
   </div>
 </template>
 
 <script>
   import { pickOrderPage } from '@/api/mes';
+  import pickOrderEdit from './pickOrderEdit.vue';
   export default {
+    components: { pickOrderEdit },
     data() {
       return {
         dialogVisible: false,
@@ -83,7 +95,8 @@
           {
             prop: 'status',
             label: '领料状态',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            slot: 'status'
           },
           {
             columnKey: 'action',
@@ -96,7 +109,20 @@
       };
     },
     methods: {
+      pickOrderEdit(row) {
+        this.$refs.pickOrderEditRef.open(row);
+      },
       handleMine() {
+        const current = this.current.orderInfoList;
+        for (const key in current) {
+          if (
+            current[key].bomDetailDTOS.length == 0 &&
+            current[key].instanceList.length == 0
+          ) {
+            this.$message.warning('当前领料单数据为空');
+            return;
+          }
+        }
         this.$emit('success', this.current);
         this.dialogVisible = false;
       },

+ 157 - 0
src/views/warehouseManagement/outgoingManagement/components/pickOrderEdit.vue

@@ -0,0 +1,157 @@
+<template>
+  <div>
+    <el-dialog
+      title="领料单详情"
+      :visible.sync="dialogVisible"
+      width="60%"
+      :before-close="handleClose"
+    >
+      <div class="main">
+        <header-title title="基本信息" size="16px"></header-title>
+        <el-row>
+          <el-col :offset="2" :span="8">领料单号:{{ orderRow.code }}</el-col>
+          <el-col :offset="6" :span="8">状态:{{ orderRow.status }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :offset="2" :span="8"
+            >执行人:{{ orderRow.executorName }}</el-col
+          >
+          <el-col :offset="6" :span="8"
+            >执行日期:{{ orderRow.executorTime }}</el-col
+          >
+        </el-row>
+        <header-title title="工单信息" size="16px"></header-title>
+        <div v-for="(item, index) in orderRow.orderInfoList" :key="index">
+          <el-row>
+            <el-col :offset="2" :span="8">工单编号:{{ item.code }}</el-col>
+          </el-row>
+          <el-table border :data="item.tableData" style="width: 100%">
+            <el-table-column
+              type="index"
+              width="80"
+              label="序号"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="categoryCode"
+              label="物品编码"
+              width="180"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="categoryName"
+              label="物品名称"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="brandNo"
+              label="牌号"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="model"
+              label="型号"
+              width="180"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="specifications"
+              label="规格"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="demandQuantity"
+              label="需求数量"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="rootCategoryLevelName"
+              width="120"
+              label="物品分类名称"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="unit"
+              label="单位"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="warehouseCode"
+              label="仓库编码"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="warehouseName"
+              label="仓库名称"
+              width="120"
+              align="center"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">关 闭</el-button>
+        <!-- <el-button type="primary" @click="handleMine">确 定</el-button> -->
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  export default {
+    data() {
+      return {
+        dialogVisible: false,
+        orderRow: {}
+      };
+    },
+    methods: {
+      handleMine() {},
+      open(row) {
+        for (const key in row.orderInfoList) {
+          row.orderInfoList[key].tableData = [];
+          for (const i in row.orderInfoList[key].bomDetailDTOS) {
+            row.orderInfoList[key].tableData.push({
+              ...row.orderInfoList[key].bomDetailDTOS[i]
+            });
+          }
+          for (const j in row.orderInfoList[key].instanceList) {
+            row.orderInfoList[key].tableData.push({
+              ...row.orderInfoList[key].instanceList[j]
+            });
+          }
+        }
+        this.orderRow = {
+          ...row,
+          status: row.status == 0 ? '未领料' : '已领料'
+        };
+        this.dialogVisible = true;
+        console.log({ ...row });
+      },
+      handleClose(done) {}
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .el-row {
+    margin-bottom: 15px;
+    font-size: 14px;
+  }
+</style>

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

@@ -43,11 +43,11 @@
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="物品编码:" prop="assetCode">
+        <el-form-item label="物品编码:" prop="code">
           <el-input
             clearable
             placeholder="请输入"
-            v-model.trim="params.assetCode"
+            v-model.trim="params.code"
           ></el-input>
         </el-form-item>
       </el-col>

+ 4 - 1
src/views/warehouseManagement/stockManagement/add.vue

@@ -1427,11 +1427,14 @@
 
                 this.warehousingMaterialList[key].cargoSpaceId =
                   this.warehousingMaterialList[key].houseList[k].cargoSpaceId;
+                this.warehousingMaterialList[key].num =
+                  this.warehousingMaterialList[key].houseList[k].num;
               }
             }
-
+            // console.log('充值', this.warehousingMaterialList);
             let arr = this.warehousingMaterialList.map((item) => {
               return {
+                num: item.num,
                 batchNo: item.batchNo,
                 categoryId: item.id,
                 count: item.outInNum,

+ 16 - 8
src/views/warehouseManagement/stockManagement/details.vue

@@ -127,7 +127,7 @@
                 <el-table-column
                   label="名称"
                   align="center"
-                  width="150"
+                  width="170"
                   prop="name"
                 ></el-table-column>
                 <el-table-column
@@ -158,14 +158,20 @@
                   prop="minPackingCount"
                   width="100"
                 >
-                  <el-table-column label="" prop="measurementUnit" width="100">
+                  <!-- <el-table-column label="" prop="measurementUnit" width="100">
                     <template slot-scope="{ row, $index }">
                       {{ row.minPackingCount }}
                     </template>
-                  </el-table-column>
-                  <el-table-column label="" prop="measurementUnit">
+                  </el-table-column> -->
+                  <el-table-column
+                    label=""
+                    prop="measurementUnit"
+                    align="center"
+                  >
                     <template slot-scope="{ row, $index }">
-                      {{ handleRowUnit(row) }} /{{ row.packingUnit }}
+                      {{ row.minPackingCount }} {{ handleRowUnit(row) }} /{{
+                        row.packingUnit
+                      }}
                     </template>
                   </el-table-column>
                 </el-table-column>
@@ -357,14 +363,16 @@
             ></el-table-column>
             <el-table-column label="名称" prop="name"></el-table-column>
             <el-table-column label="最小包装单元" prop="modelType">
-              <el-table-column label="" prop="minPackingCount" width="100">
+              <!-- <el-table-column label="" prop="minPackingCount" width="100">
                 <template slot-scope="{ row, $index }">
                   {{ row.minPackingCount }}
                 </template>
-              </el-table-column>
+              </el-table-column> -->
               <el-table-column label="" prop="measurementUnit">
                 <template slot-scope="{ row, $index }">
-                  {{ handleRowUnit(row) }} /{{ row.packingUnit }}
+                  {{ row.minPackingCount }}{{ handleRowUnit(row) }} /{{
+                    row.packingUnit
+                  }}
                 </template>
               </el-table-column>
             </el-table-column>