From 854cbc47742ee83eb30062a12b9f3ed7c8ed0941 Mon Sep 17 00:00:00 2001
From: futian.liu <liufutianyoo@163.com>
Date: 星期三, 20 十二月 2023 16:58:27 +0800
Subject: [PATCH] 盘点物品型号修改

---
 admin-web/src/views/departmentitem/itemret/returnNote/index.vue |   77 +++++++++++++++++++++++---------------
 1 files changed, 46 insertions(+), 31 deletions(-)

diff --git a/admin-web/src/views/departmentitem/itemret/returnNote/index.vue b/admin-web/src/views/departmentitem/itemret/returnNote/index.vue
index 9c9e512..c327b00 100644
--- a/admin-web/src/views/departmentitem/itemret/returnNote/index.vue
+++ b/admin-web/src/views/departmentitem/itemret/returnNote/index.vue
@@ -12,7 +12,7 @@
             <div class="table-tool-bar" style="margin-bottom: 15px;">
               <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" />
             </div>
-            <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading">
+            <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading">
               <el-row v-if="list.length" class="card" :gutter="5">
                 <el-col v-for="(item, index) in list" :key="index" class="cm-item">
                   <el-card class="card-data">
@@ -23,29 +23,24 @@
                           <span class="value">{{ item.businessFormCode }}</span>
                         </div>
                         <div class="card-header-right">
-                            <el-button site="form" type="success" size="mini" @click="handleExport(item)"
-                              >瀵煎嚭閫�鍥炲崟</el-button
-                            >
-                          <el-button name="鏌ョ湅璇︽儏" site="form" type="info" size="mini" @click="handleDetail(item)"
-                            >鏌ョ湅璇︽儏</el-button
-                          >
+                          <el-button name="鏌ョ湅璇︽儏" site="form" type="info" size="mini" @click="handleDetail(item)">鏌ョ湅璇︽儏</el-button>
                         </div>
                       </div>
                       <div class="one-hed">
-                        <div class="box"><span class="span-two">閮ㄩ棬锛�</span>{{ item.agencyName }}</div>
+                        <div class="box"><span class="span-two">閮ㄩ棬锛�</span>{{ item.departmentName }}</div>
                         <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.operatorName }}</div>
                         <div class="box">
                           <span class="span-two">閫�鍥炴椂闂达細</span>{{ item.dealTime | formatTime }}
                         </div>
                       </div>
                       <div class="card-end">
-                        <div v-for="(just, index) in item.formOutputTemplateInfoList" :key="index" class="item">
-                          <div class="name">{{ just.goodsName }}</div>
+                        <div v-for="(just, index) in item.goodsTemplateInfoList" :key="index" class="item">
+                          <div class="name">{{ just.baseGoodsTemplateName }}</div>
                           <div class="value-box">
                             <div class="value-box-item">
                               <span class="label">鏁伴噺锛�</span>
                               <span class="value">{{ just.count }}</span>
-                              <span class="unit">{{ just.unit }}</span>
+                              <span class="unit">{{ just.unit||'' }}</span>
                             </div>
                           </div>
                         </div>
@@ -54,7 +49,7 @@
                   </el-card>
                 </el-col>
               </el-row>
-              <div class="no-data" v-else>鏆傛棤鏁版嵁</div>
+              <el-empty v-else description="鏆傛棤鏁版嵁"></el-empty>
             </div>
             <el-pagination
               :small="false"
@@ -77,12 +72,14 @@
 </template>
 
 <script>
-import { outputList } from '@/api/stock/accessStock';
 import MyButton from '@/components/myButton/myButton';
 import myImport from '@/views/components/myImport';
 import edit from './edit';
 import detail from './detail';
-import listPage from '../../../mixins/listPage'
+import listPage from '@/views/mixins/listPage'
+import {getUserDetail} from "@/utils/auth";
+import SettingIplatform from "@/utils/settingIplatform";
+import {returnList} from "@/api/deptGoods/itemret";
 
 export default {
   name: 'index',
@@ -101,10 +98,36 @@
           defaultValue: '',
         },
         {
-          type: 'text',
-          dataIndex: 'goodsName',
+          type: 'select',
+          dataIndex: 'departmentId',
+          label: '鍒嗗彂閮ㄩ棬',
+          placeholder: '璇烽�夋嫨',
+          optionsConfig: {
+            url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`,
+            label: 'name',
+            value: 'id',
+          },
+          defaultValue: '',
+          options: [],
+        },
+        {
+          type: 'select',
+          dataIndex: 'goodsTemplateId',
           label: '鐗╁搧鍚嶇О',
-          placeholder: '鍙ā绯婃悳绱�',
+          placeholder: '璇烽�夋嫨',
+          defaultValue: '',
+          options: [],
+          optionsConfig: {
+            label: 'goodsName',
+            value: 'id',
+            url: SettingIplatform.apiBaseURL + `/pc/base/goods/template/query/goodsTemplate?tenantId=${getUserDetail().tenantId}`,
+          },
+        },
+        {
+          type: 'text',
+          dataIndex: 'createName',
+          label: '鍒涘缓浜�',
+          placeholder: '璇疯緭鍏�',
           defaultValue: '',
         },
         {
@@ -122,10 +145,13 @@
       ],
     };
   },
+  created() {
+    this.fetchData()
+  },
   methods: {
     fetchData() {
       this.loading = true;
-      outputList({
+      returnList({
         pageNum: this.pageNum,
         pageSize: this.pageSize,
         ...this.filterFrom,
@@ -133,20 +159,9 @@
         this.list = res.datas;
         this.total = res.totalRows;
         this.loading = false;
+      }).catch(()=>{
+        this.loading = false;
       });
-    },
-    fifterForm(params) {
-      this.filterFrom = Object.assign(this.filterFrom, params);
-      if (this.filterFrom.startTime) {
-        this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, '');
-      }
-      if (this.filterFrom.endTime) {
-        this.filterFrom.endTime = this.filterFrom.endTime.replace(/\-/g, '');
-      }
-      if (this.filterFrom.agencyId&&this.filterFrom.agencyId.length) {
-        this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1];
-      }
-      this.search(1);
     },
   },
 };

--
Gitblit v1.9.1