Browse Source

新增资产信息拉取接口、修改优化后台页面

LinWuTai 1 year ago
parent
commit
00fb8e1d31

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/inventory/service/impl/TbAssetInventoryServiceImpl.java

@@ -97,7 +97,7 @@ public class TbAssetInventoryServiceImpl implements ITbAssetInventoryService
             List<TagInfo> list = dto.getAssetList();
             String location = dto.getInventoryLocation();
             String orderNumber = dto.getOrderNumber();
-            //提取epc
+            //提取epc rfid
             ArrayList<String> epcList = new ArrayList<>();
             for (TagInfo tagInfo : list) {
                 epcList.add(tagInfo.getEpc());

+ 5 - 0
ruoyi-admin/src/main/java/com/ruoyi/visitor/controller/VController.java

@@ -34,6 +34,11 @@ public class VController extends BaseController {
         return getDataTable(list);
     }
 
+    @GetMapping("/asset/list")
+    public AjaxResult assetAll() {
+        return success(tbAssetInformationService.selectTbAssetInformationList(new TbAssetInformation()));
+    }
+
     /*
     *  接口:/visitor/location/{number}
     * */

+ 3 - 2
ruoyi-ui/src/views/asset/information/index.vue

@@ -408,9 +408,9 @@
     <el-table v-loading="loading" :data="informationList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="编号" align="center" prop="id" /> -->
-      <el-table-column label="资产条码" align="center" prop="code" />
-      <el-table-column label="资产名称" align="center" prop="name" />
       <el-table-column label="资产编号" align="center" prop="number" />
+      <el-table-column label="资产名称" align="center" prop="name" />
+      <el-table-column label="资产条码" v-if="isExist('资产条码')" align="center" prop="code" />
       <el-table-column label="照片" align="center" prop="imageUrl" width="100" >
         <template slot-scope="scope">
           <image-preview :src="scope.row.imageUrl" :width="50" :height="50" v-show="(scope.row.imageUrl===''||scope.row.imageUrl==null)?false:true"/>
@@ -760,6 +760,7 @@
         <el-checkbox label="维修人员" border></el-checkbox>
         <el-checkbox label="记录状态" border></el-checkbox>
         <el-checkbox label="是否白名单" border></el-checkbox>
+        <el-checkbox label="资产条码" border></el-checkbox>
       </el-checkbox-group>
     </div>
   </template>

+ 12 - 5
ruoyi-ui/src/views/inventory/detail/index.vue

@@ -69,16 +69,16 @@
           v-hasPermi="['inventory:detail:export']"
         >导出</el-button>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="id" />
       <el-table-column label="资产名称" align="center" prop="assetInfo.name" />
-      <el-table-column label="资产编号" align="center" prop="assetInfo.number" />
-      <el-table-column label="创建时间" align="center" prop="createTime"/>
-      <el-table-column label="盘点元数据" align="center" prop="inventoryMetadata" >
+      <el-table-column label="资产编号" align="center" prop="assetInfo.number"  v-if="columns[0].visible" />
+      <el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[1].visible" />
+      <el-table-column label="盘点元数据" align="center" prop="inventoryMetadata" v-if="columns[2].visible"  >
         <template slot-scope="props">
           <el-button
                   type="text"
@@ -97,7 +97,7 @@
           <dict-tag :options="dict.type.inventory_detail_is_update_data" :value="scope.row.isUpdateData"/>
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="备注" align="center" prop="remark"  v-if="columns[3].visible" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -207,6 +207,13 @@ export default {
       detailList: [],
       // 弹出层标题
       title: "",
+      // 列信息
+      columns: [
+        { key: 0, label: `资产编号`, visible: false },
+        { key: 1, label: `创建时间`, visible: false },
+        { key: 2, label: `盘点元数据`, visible: false },
+        { key: 3, label: `备注`, visible: false }
+      ],
       // 是否显示弹出层
       open: false,
       // 查询参数