huang_an %!s(int64=2) %!d(string=hai) anos
pai
achega
84c06d7168

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

@@ -1204,8 +1204,25 @@
               outInWarehouse: { ...this.formData, type: 1 },
               warehouseLedgerInfos: this.warehousingMaterialList
             };
+            console.log('第一层', this.warehousingMaterialList);
+
+            for (let key in this.warehousingMaterialList) {
+              for (let k in this.warehousingMaterialList[key].houseList) {
+                this.warehousingMaterialList[key].warehouseName =
+                  this.warehousingMaterialList[key].houseList[k].warehouseName;
+
+                this.warehousingMaterialList[key].areaName =
+                  this.warehousingMaterialList[key].houseList[k].areaName;
+
+                this.warehousingMaterialList[key].shelfCode =
+                  this.warehousingMaterialList[key].houseList[k].shelfCode;
+
+                this.warehousingMaterialList[key].cargoSpaceCode =
+                  this.warehousingMaterialList[key].houseList[k].cargoSpaceCode;
+              }
+            }
+
             let arr = this.warehousingMaterialList.map((item) => {
-              // :value="`${row.warehouseName}-${row.areaName}-${row.shelfCode}-${row.cargoSpaceCode}`"
               return {
                 batchNo: item.batchNo,
                 categoryId: item.id,
@@ -1220,7 +1237,8 @@
                 pathIds: `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`,
                 pathName: `${item.warehouseName},${item.areaName},${item.shelfCode},${item.cargoSpaceCode}`,
                 totalMoney:
-                  item.outInNum * item.minPackingCount * item.univalence
+                  item.outInNum * item.minPackingCount * item.univalence,
+                weightUnit: item.weightUnit
               };
             });
             arr.forEach((item) => {
@@ -1368,9 +1386,7 @@
         this.$refs.formName.validateField('contentImage');
       },
       houseData(argum, idx) {
-        console.log(argum);
         this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
-        console.log('==s', this.warehousingMaterialList);
       }
     }
   };

+ 65 - 73
src/views/warehouseManagement/stockManagement/details.vue

@@ -20,32 +20,32 @@
             <el-form label-width="120px">
               <el-col :span="8">
                 <el-form-item label="入库单:">
-                  <span>{{ infoData.bizNum }}</span>
+                  <span>{{ infoData.bizNo }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="入库物品类型:">
-                  <span>{{ handleAssetType(infoData.assetType) }}</span>
+                  <span>{{ handleAssetType(extInfo.assetType) }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="入库场景:">
-                  <span>{{ getSceneState(infoData.bizScene) }}</span>
+                  <span>{{ getSceneState(infoData.type) }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="销售订单:">
-                  <span>{{ infoData.documentSource }}</span>
+                  <span>{{ extInfo.documentSource }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="权属部门:">
-                  <span>{{ infoData.deptName }}</span>
+                  <span>{{ extInfo.deptName }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="入库登记人:">
-                  <span>{{ infoData.createUserName }}</span>
+                  <span>{{ extInfo.createUserName }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -55,7 +55,7 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="入库时间:">
-                  <span>{{ infoData.verifyTime }}</span>
+                  <span>{{ infoData.createTime }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -70,17 +70,17 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="供应商:">
-                  <span>{{ infoData.supplierName }}</span>
+                  <span>{{ extInfo.supplierName }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="送货人:">
-                  <span>{{ infoData.deliveryName }}</span>
+                  <span>{{ infoData.fromUser }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
                 <el-form-item label="送货人联系方式:">
-                  <span>{{ infoData.deliveryPhone }}</span>
+                  <span>{{ extInfo.deliveryPhone }}</span>
                 </el-form-item>
               </el-col>
               <el-col :span="8">
@@ -109,7 +109,7 @@
             <div class="mt10">
               <el-table
                 ref="multipleTable"
-                :data="warehousingMaterialList.ledgers"
+                :data="warehousingMaterialList"
                 tooltip-effect="dark"
                 :key="infoData.assetType"
                 style="width: 100%"
@@ -120,7 +120,7 @@
                 </el-table-column>
                 <el-table-column
                   label="物品编码"
-                  prop="assetCode"
+                  prop="categoryCode"
                   align="center"
                   width="150"
                 ></el-table-column>
@@ -128,7 +128,7 @@
                   label="名称"
                   align="center"
                   width="150"
-                  prop="assetName"
+                  prop="name"
                 ></el-table-column>
                 <el-table-column
                   v-for="(item, index) in tableHeader"
@@ -147,7 +147,7 @@
                 </el-table-column>
                 <el-table-column
                   label="批次号"
-                  prop="batchNum"
+                  prop="batchNo"
                   width="150"
                   align="center"
                 >
@@ -155,28 +155,28 @@
                 <el-table-column
                   label="最小包装单元"
                   align="center"
-                  prop="measurementUnit"
+                  prop="minPackingCount"
                   width="100"
                 >
                   <el-table-column label="" prop="measurementUnit" width="100">
                     <template slot-scope="{ row, $index }">
-                      {{ row.measurementUnit }}
+                      {{ row.minPackingCount }}
                     </template>
                   </el-table-column>
                   <el-table-column label="" prop="measurementUnit">
                     <template slot-scope="{ row, $index }">
-                      {{ row.unit }} /{{ row.minPackUnit }}
+                      {{ row.weightUnit }} /{{ row.packingUnit }}
                     </template>
                   </el-table-column>
                 </el-table-column>
                 <el-table-column
                   label="包装数量"
-                  prop="outInNum"
+                  prop="packingCount"
                   width="150"
                   align="center"
                 >
                   <template slot-scope="{ row, $index }">
-                    {{ row.outInNum }} {{ row.minPackUnit }}
+                    {{ row.packingCount }} {{ row.packingUnit }}
                   </template>
                 </el-table-column>
                 <el-table-column
@@ -186,9 +186,9 @@
                   align="center"
                 >
                   <template slot-scope="{ row }">
-                    <template v-if="row.univalence || row.univalence === 0">
-                      {{ row.univalence }}
-                      {{ { yuan: '元', wanyuan: '万元' }[row.univalenceUnit] }}
+                    <template>
+                      {{ row.price + '元' }}/{{ row.weightUnit }}
+                      <!-- {{ { yuan: '元', wanyuan: '万元' }[row.univalenceUnit] }} -->
                     </template>
                   </template>
                 </el-table-column>
@@ -205,27 +205,9 @@
                       //   row.univalence,
                       //   row
                       // ) -->
-                    {{ row.univalence }}
-                    {{ row.univalenceUnit }}
+                    {{ row.totalMoney }}
                   </template>
                 </el-table-column>
-                <el-table-column
-                  label="质检单"
-                  v-if="infoData.assetType === 3"
-                  prop=""
-                  width="150"
-                  :show-overflow-tooltip="true"
-                >
-                  <template slot-scope="{ row, $index }">
-                    <el-link
-                      type="primary"
-                      v-for="(item, index) in row.contentImage || []"
-                      @click="contentImageDownload(item)"
-                      >{{ item.name }}</el-link
-                    >
-                  </template>
-                </el-table-column>
-
                 <el-table-column
                   label="货位"
                   prop="warehouseName"
@@ -242,13 +224,13 @@
         <div class="mt20">
           <!-- =={{ getDictValue('类型用途', infoData.assetType) }} -->
           <header-title
-            :title="`${handleAssetType(infoData.assetType)}明细`"
+            :title="`${handleAssetType(extInfo.assetType)}明细`"
             size="16px"
           ></header-title>
 
           <el-table
             ref="multipleTable"
-            :data="materialCodeReqList"
+            :data="detailList"
             tooltip-effect="dark"
             :header-cell-style="rowClass"
             style="width: 100%"
@@ -257,42 +239,37 @@
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
             <el-table-column
-              :label="`${getDictValue('类型用途', infoData.assetType)}编码`"
-              prop="onlyCode"
+              :label="`${handleAssetType(extInfo.assetType)}编码`"
+              prop="code"
             ></el-table-column>
-            <el-table-column label="包装编码" prop="num"></el-table-column>
-            <el-table-column label="批次号" prop="batchNum"></el-table-column>
+            <el-table-column
+              label="包装编码"
+              prop="packageNo"
+            ></el-table-column>
+            <el-table-column label="批次号" prop="batchNo"></el-table-column>
             <el-table-column
               label="物品编码"
-              prop="assetCode"
+              prop="categoryCode"
             ></el-table-column>
-            <el-table-column label="名称" prop="assetName"></el-table-column>
+            <el-table-column label="名称" prop="name"></el-table-column>
             <el-table-column label="最小包装单元" prop="modelType">
-              <el-table-column label="" prop="measurementUnit" width="100">
+              <el-table-column label="" prop="minPackingCount" width="100">
                 <template slot-scope="{ row, $index }">
-                  {{ row.measurementUnit }}
+                  {{ row.minPackingCount }}
                 </template>
               </el-table-column>
               <el-table-column label="" prop="measurementUnit">
                 <template slot-scope="{ row, $index }">
-                  {{ row.unit }} /{{ row.minPackUnit }}
+                  {{ row.weightUnit }} /{{ row.packingUnit }}
                 </template>
               </el-table-column>
             </el-table-column>
-            <el-table-column
-              label="生产日期"
-              prop="manufactureTime"
-              width="200"
-            >
-              <template slot="header" slot-scope="scope">
-                {{
-                  { manufactureTime: '生产日期', procurementTime: '采购日期' }[
-                    curDateType
-                  ]
-                }}
-              </template>
+            <el-table-column label="日期" prop="createTime" width="200">
+              <!-- <template slot="header" slot-scope="scope">
+                {{ dateType == 1 ? '采购日期' : '生产日期' }}
+              </template> -->
               <template slot-scope="{ row }">
-                {{ row[curDateType] }}
+                {{ row.createTime }}
               </template>
             </el-table-column>
           </el-table>
@@ -327,10 +304,12 @@
     components: { StatusStep, PageHeader },
     data() {
       return {
+        detailList: [],
+        extInfo: {},
         codeList: [],
         auditStatus,
         infoData: {},
-        warehousingMaterialList: {},
+        warehousingMaterialList: [],
         tableData2: [],
         activeName: 'a',
         num: 1,
@@ -394,11 +373,11 @@
       },
       emergencyState() {
         return useDict(emergencyState)(this.infoData.emergencyState);
-      },
-      // 条码信息
-      materialCodeReqList() {
-        return this.warehousingMaterialList.warehouseLedgerDetails;
       }
+      // 条码信息
+      // materialCodeReqList() {
+      //   return this.warehousingMaterialList.warehouseLedgerDetails;
+      // }
     },
     created() {
       this.requestDict('类型用途');
@@ -426,10 +405,23 @@
         return { background: '#EEEEEE', border: 'none' };
       },
       async _getInfo() {
-        const res = await outin.getWms(this.$route.query.id);
+        const res = await outin.getById(this.$route.query.id);
+        console.log('===', res);
         if (res) {
-          this.infoData = res.inOutVO;
-          this.warehousingMaterialList = res.warehouseLedgerInfos;
+          this.infoData = res;
+          this.extInfo = res.extInfo;
+          this.warehousingMaterialList = res.outInDetailVOList;
+          const arr = [];
+          for (const key in this.warehousingMaterialList) {
+            for (const k in this.warehousingMaterialList[key]
+              .outInDetailRecordVOList) {
+              arr.push({
+                ...this.warehousingMaterialList[key].outInDetailRecordVOList[k],
+                weightUnit: this.warehousingMaterialList[key].weightUnit
+              });
+            }
+          }
+          this.detailList = arr;
         }
         const { data } = await getTreeByPid(0);
         this.codeList = data.map((item) => {

+ 2 - 15
src/views/warehouseManagement/stockManagement/index.vue

@@ -116,11 +116,6 @@
             {{ row.bizNo }}
           </el-link>
         </template>
-        <!-- 入库人 -->
-        <template v-slot:createUserId="{ row }">
-          {{ returnName(row.createUserId) }}
-        </template>
-
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
@@ -193,11 +188,10 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'createUserId',
+            prop: 'createUserName',
             label: '入库人',
             align: 'center',
-            showOverflowTooltip: true,
-            slot: 'createUserId'
+            showOverflowTooltip: true
           },
           {
             width: 160,
@@ -232,13 +226,6 @@
     },
     created() {},
     methods: {
-      returnName(row) {
-        const list = this.$store.state.userPage.userList;
-        const name = list.find((item) => {
-          return item.id == row;
-        }).name;
-        return name;
-      },
       async datasource({ page, limit, where }) {
         const params = Object.assign({}, this.formData);
         if (params.time?.length) {