Преглед изворни кода

优化修改后台盘点详细页面

LinWuTai пре 1 година
родитељ
комит
28a2e8c7ed

+ 2 - 3
ruoyi-admin/src/main/resources/application.yml

@@ -77,9 +77,9 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: localhost
+    host: 139.9.50.163
     # 密码
-    #password: foobared
+    password: foobared
     # 端口,默认为6379
     port: 6379
     # 数据库索引
@@ -96,7 +96,6 @@ spring:
         max-active: 8
         # #连接池最大阻塞等待时间(使用负值表示没有限制)
         max-wait: -1ms
-    password:
 
 # token配置
 token:

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

@@ -13,7 +13,7 @@
       <el-form-item label="是否更新数据" prop="isUpdateData">
         <el-select v-model="queryParams.isUpdateData" placeholder="请选择是否更新数据" clearable>
           <el-option
-            v-for="dict in dict.type.sys_yes_no"
+            v-for="dict in dict.type.inventory_detail_is_update_data"
             :key="dict.value"
             :label="dict.label"
             :value="dict.value"
@@ -94,7 +94,7 @@
       </el-table-column>
       <el-table-column label="是否更新数据" align="center" prop="isUpdateData">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUpdateData"/>
+          <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" />
@@ -138,7 +138,7 @@
         <el-form-item label="是否更新数据" prop="isUpdateData">
           <el-select v-model="form.isUpdateData" placeholder="请选择是否更新数据">
             <el-option
-              v-for="dict in dict.type.sys_yes_no"
+              v-for="dict in dict.type.inventory_detail_is_update_data"
               :key="dict.value"
               :label="dict.label"
               :value="parseInt(dict.value)"
@@ -174,7 +174,7 @@ import { listDetail, getDetail, delDetail, addDetail, updateDetail } from "@/api
 
 export default {
   name: "Detail",
-  dicts: ['sys_yes_no'],
+  dicts: ['inventory_detail_is_update_data'],
   props: {
     orderNumber: {
       type: String,

+ 0 - 1
ruoyi-ui/src/views/inventory/inventory/index.vue

@@ -385,7 +385,6 @@ export default {
     },
     getTreeSelect() {
       treeSelect().then(res => {
-        console.log('下拉树结果', res)
         this.locationOption = res.data
       })
     },

+ 29 - 11
ruoyi-ui/src/views/order/detail/index.vue

@@ -2,6 +2,7 @@
   <div class="app-container">
     <el-form
       :model="queryParams"
+      class="queryForm"
       ref="queryForm"
       size="small"
       :inline="true"
@@ -47,15 +48,16 @@
       </el-form-item>
       <el-form-item
         v-if="orderInfo.orderType === 2"
-        label="【调拨】旧功能位置编号"
+        label="【调拨】旧功能位置"
         prop="allocationOldLocationNumber"
       >
-        <el-input
+        <!-- <el-input
           v-model="queryParams.allocationOldLocationNumber"
           placeholder="请输入【调拨】旧功能位置编号"
           clearable
           @keyup.enter.native="handleQuery"
-        />
+        /> -->
+         <treeselect v-model="queryParams.allocationOldLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="【调拨】旧功能位置" />
       </el-form-item>
       <el-form-item
         v-if="orderInfo.orderType === 2"
@@ -71,10 +73,10 @@
       </el-form-item>
       <el-form-item
         v-if="orderInfo.orderType === 2"
-        label="【调拨】新功能位置编号"
+        label="【调拨】新功能位置"
         prop="allocationNewLocationNumber"
       >
-        <el-select
+        <!-- <el-select
           v-model="queryParams.allocationNewLocationNumber"
           placeholder="请选择【调拨】新功能位置"
         >
@@ -84,7 +86,8 @@
             :label="item.name"
             :value="item.number"
           ></el-option>
-        </el-select>
+        </el-select> -->
+        <treeselect v-model="queryParams.allocationNewLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="【调拨】新功能位置" />
       </el-form-item>
       <el-form-item
         v-if="orderInfo.orderType === 3"
@@ -371,6 +374,7 @@
               :value="item.number"
             ></el-option>
           </el-select>
+          <!-- <treeselect v-model="form.allocationNewLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="请选择【调拨】新功能位置" /> -->
         </el-form-item>
         <el-form-item
           v-if="orderInfo.orderType === 2"
@@ -387,7 +391,7 @@
           label="【调拨】新功能位置"
           prop="allocationNewLocationNumber"
         >
-          <el-select
+          <!-- <el-select
             v-model="form.allocationNewLocationNumber"
             placeholder="请选择【调拨】新功能位置"
           >
@@ -397,7 +401,8 @@
               :label="item.name"
               :value="item.number"
             ></el-option>
-          </el-select>
+          </el-select> -->
+          <treeselect v-model="form.allocationNewLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="请选择【调拨】新功能位置" />
         </el-form-item>
         <el-form-item
           v-if="orderInfo.orderType === 3"
@@ -464,8 +469,10 @@ import {
   addDetail,
   updateDetail,
 } from "@/api/order/detail";
-import { listLocation } from "@/api/asset/location";
+import { treeSelect } from "@/api/asset/location";
 import { listInformation } from "@/api/asset/information";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
   name: "Detail",
   props: {
@@ -497,6 +504,9 @@ export default {
       },
     },
   },
+  components: {
+    Treeselect
+  },
   data() {
     return {
       // 遮罩层
@@ -566,14 +576,22 @@ export default {
         this.loading = false;
       });
     },
+    tenantIdnormalizer(node) {
+      return {
+        id: node.number,
+        label: node.label,
+        children: node.children
+      }
+    },
     /** 获取所属位置 */
     getLocation() {
-      listLocation().then((response) => {
-        this.locationList = response.rows;
+      treeSelect().then((response) => {
+        this.locationList = response.data;
       });
     },
     getAssetName(val){
       let arr = this.informationList.filter(item => item.number===val);
+      console.log('arr', arr)
        return arr[0].name
     },
     // 取消按钮