huang_an před 2 roky
rodič
revize
4b45b23633
1 změnil soubory, kde provedl 96 přidání a 12 odebrání
  1. 96 12
      src/views/warehouseManagement/stockManagement/add.vue

+ 96 - 12
src/views/warehouseManagement/stockManagement/add.vue

@@ -287,18 +287,7 @@
                   </el-form-item>
                   </el-form-item>
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
-              <el-table-column
-                label="计量单位"
-                prop="batchNo"
-                width="150"
-                align="center"
-              >
-                <template slot-scope="{ row, $index }">
-                  <template>
-                    {{ row.measuringUnit }}
-                  </template>
-                </template>
-              </el-table-column>
+
               <el-table-column
               <el-table-column
                 label="最小包装单元"
                 label="最小包装单元"
                 align="center"
                 align="center"
@@ -418,11 +407,63 @@
                   }}
                   }}
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
+              <el-table-column
+                label="数量"
+                prop="batchNo"
+                width="150"
+                align="center"
+                v-if="formData.extInfo.assetType == 1"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template> {{ row.outInNum }} </template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="数量"
+                prop="batchNo"
+                width="150"
+                align="center"
+                v-if="formData.extInfo.assetType == 4"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.minPackingCount * row.outInNum }}
+                  </template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="计量单位"
+                prop="batchNo"
+                width="150"
+                align="center"
+                v-if="formData.extInfo.assetType == 1"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.minPackUnit }}
+                  </template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="计量单位"
+                prop="batchNo"
+                width="150"
+                align="center"
+                v-if="formData.extInfo.assetType == 4"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template>
+                    {{ row.measuringUnit }}
+                  </template>
+                </template>
+              </el-table-column>
+
               <el-table-column
               <el-table-column
                 label="重量"
                 label="重量"
                 align="center"
                 align="center"
                 prop="contentImage"
                 prop="contentImage"
                 :show-overflow-tooltip="true"
                 :show-overflow-tooltip="true"
+                v-if="formData.extInfo.assetType == 1"
               >
               >
                 <template slot-scope="{ row, $index }">
                 <template slot-scope="{ row, $index }">
                   {{ weightTotal(row.outInNum, row.minPackingCount) }}
                   {{ weightTotal(row.outInNum, row.minPackingCount) }}
@@ -434,6 +475,28 @@
                   </template>
                   </template>
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
+              <el-table-column
+                label="重量"
+                align="center"
+                prop="contentImage"
+                :show-overflow-tooltip="true"
+                v-if="formData.extInfo.assetType == 4"
+              >
+                <template slot-scope="{ row, $index }">
+                  {{
+                    deviceWeight(
+                      row.roughWeight,
+                      row.minPackingCount * row.outInNum
+                    )
+                  }}
+                  <template slot="append">
+                    {{ handleRowUnit(row) }}
+                    <!-- {{
+                          { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
+                        }} -->
+                  </template>
+                </template>
+              </el-table-column>
               <el-table-column
               <el-table-column
                 label="重量单位"
                 label="重量单位"
                 align="center"
                 align="center"
@@ -704,6 +767,7 @@
   // import user from '@/api/main/user';
   // import user from '@/api/main/user';
   import { tableHeader } from '../common';
   import { tableHeader } from '../common';
   import { getCode } from '@/api/codeManagement/index.js';
   import { getCode } from '@/api/codeManagement/index.js';
+  import { number } from 'echarts/core';
   export default {
   export default {
     components: {
     components: {
       selectUpload,
       selectUpload,
@@ -801,6 +865,14 @@
       this.initData();
       this.initData();
     },
     },
     methods: {
     methods: {
+      //计算生产设备重量
+      deviceWeight(row, num) {
+        if (row) {
+          return Number(row * num);
+        } else {
+          return row;
+        }
+      },
       //计算重量
       //计算重量
       weightTotal(PackingCount, outInNum) {
       weightTotal(PackingCount, outInNum) {
         const total = {
         const total = {
@@ -1219,6 +1291,18 @@
 
 
                 this.warehousingMaterialList[key].cargoSpaceCode =
                 this.warehousingMaterialList[key].cargoSpaceCode =
                   this.warehousingMaterialList[key].houseList[k].cargoSpaceCode;
                   this.warehousingMaterialList[key].houseList[k].cargoSpaceCode;
+
+                this.warehousingMaterialList[key].warehouseId =
+                  this.warehousingMaterialList[key].houseList[k].warehouseId;
+
+                this.warehousingMaterialList[key].areaId =
+                  this.warehousingMaterialList[key].houseList[k].areaId;
+
+                this.warehousingMaterialList[key].shelfId =
+                  this.warehousingMaterialList[key].houseList[k].shelfId;
+
+                this.warehousingMaterialList[key].cargoSpaceId =
+                  this.warehousingMaterialList[key].houseList[k].cargoSpaceId;
               }
               }
             }
             }