LAPTOP-16IUEB3P\Lenovo 2 лет назад
Родитель
Сommit
8de70a9c89
2 измененных файлов с 8 добавлено и 11 удалено
  1. 1 2
      src/api/ledgerAssets/index.js
  2. 7 9
      src/views/ledgerAssets/material/components/baseInfo.vue

+ 1 - 2
src/api/ledgerAssets/index.js

@@ -60,8 +60,7 @@ export async function saveOrEdit (data) {
 
 
 // 根据类别统计位置数量
 // 根据类别统计位置数量
 export async function getCount (data) {
 export async function getCount (data) {
-  let par = new URLSearchParams(data);
-  const res = await request.get(`/main/asset/countPosition?` + par, {});
+  const res = await request.get(`/main/asset/countPosition` , { params: data } );
   if (res.data.code == 0) {
   if (res.data.code == 0) {
     return res.data.data;
     return res.data.data;
   }
   }

+ 7 - 9
src/views/ledgerAssets/material/components/baseInfo.vue

@@ -106,7 +106,7 @@
         :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
         :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
         @selection-change="handleSelectionChange"
         @selection-change="handleSelectionChange"
       >
       >
-        <el-table-column type="selection" width="55"> </el-table-column>
+        <el-table-column type="selection" width="55" align="center"> </el-table-column>
         <el-table-column type="index" label="序号" width="100">
         <el-table-column type="index" label="序号" width="100">
         </el-table-column>
         </el-table-column>
         <el-table-column prop="code" label="编码"> </el-table-column>
         <el-table-column prop="code" label="编码"> </el-table-column>
@@ -191,7 +191,7 @@ export default {
       total: 0,
       total: 0,
       searchForm: {
       searchForm: {
         categoryId:this.rowId,
         categoryId:this.rowId,
-        positionType:1
+        positionType:2
       },
       },
       multipleSelection: [],
       multipleSelection: [],
       openWindows: false, //打印弹窗
       openWindows: false, //打印弹窗
@@ -216,11 +216,11 @@ export default {
     tabClick (val) {
     tabClick (val) {
       switch (this.activeName) {
       switch (this.activeName) {
         case 'inUse': {
         case 'inUse': {
-          this.positionType = 1
+          this.positionType = 2
           break
           break
         }
         }
         case 'inLibrary': {
         case 'inLibrary': {
-          this.positionType = 2
+          this.positionType = 1
           break
           break
         }
         }
         case 'hasConsume': {
         case 'hasConsume': {
@@ -354,13 +354,11 @@ export default {
     getCountNum () {
     getCountNum () {
       const params = {
       const params = {
         categoryId:  this.rowId,
         categoryId:  this.rowId,
-        sourceBizNo: this.searchForm.sourceBizNo,
-        sourceBatchNo: this.searchForm.sourceBatchNo
+        sourceBizNo: this.searchForm.sourceBizNo?this.searchForm.sourceBizNo:'',
+        sourceBatchNo: this.searchForm.sourceBatchNo?this.searchForm.sourceBatchNo:''
       }
       }
       getCount(params).then(res => {
       getCount(params).then(res => {
-        if (res?.success) {
-          this.countInfo = res.data
-        }
+          this.countInfo = res
       })
       })
     }
     }
   }
   }