From ed2117c738eedd3143d3b2ad6b0d40b2116afcf6 Mon Sep 17 00:00:00 2001
From: liuguocan <527956374@qq.com>
Date: 星期二, 28 十一月 2023 14:44:49 +0800
Subject: [PATCH] 首页/物品分发/物品报废

---
 admin-web/src/views/departmentitem/itemdis/distribution/index.vue |   98 +++++++++++--------------------------------------
 1 files changed, 22 insertions(+), 76 deletions(-)

diff --git a/admin-web/src/views/departmentitem/itemdis/distribution/index.vue b/admin-web/src/views/departmentitem/itemdis/distribution/index.vue
index d94c697..8e45fed 100644
--- a/admin-web/src/views/departmentitem/itemdis/distribution/index.vue
+++ b/admin-web/src/views/departmentitem/itemdis/distribution/index.vue
@@ -10,8 +10,7 @@
           <el-col>
             <!--鍒楄〃-->
             <div class="table-tool-bar" style="margin-bottom: 15px">
-              <my-button name="鐗╁搧鍒嗗彂" @click="handleAdd" site="tools" size="medium" icon="el-icon-edit-outline" />
-              <my-button name="瀵煎叆" @click="importSetting.dialogShow = true" site="tools" size="medium" />
+              <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" />
             </div>
             <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading">
               <el-row v-if="list.length" class="card" :gutter="5">
@@ -24,9 +23,7 @@
                           <span class="value">{{ item.businessFormCode }}</span>
                         </div>
                         <div class="card-header-right">
-                          <el-button name="鏌ョ湅璇︽儏" site="form" type="info" size="mini" @click="handleDetail(item)"
-                            >鏌ョ湅璇︽儏</el-button
-                          >
+                          <el-button name="鏌ョ湅璇︽儏" site="form" type="primary" size="mini" @click="handleDetail(item)">鏌ョ湅璇︽儏</el-button>
                         </div>
                       </div>
                       <div class="one-hed">
@@ -82,11 +79,6 @@
       @close="detailSetting.show = false"
       ref="detailRef"
     ></detail>
-    <my-import
-      :import-setting="importSetting"
-      :dialog-show="importSetting.dialogShow"
-      :dialog-title="importSetting.dialogTitle"
-    />
   </div>
 </template>
 
@@ -98,7 +90,7 @@
 import edit from './edit';
 import detail from './detail';
 import { getBaseUrl } from '@/utils/base';
-import listPage from '../../../mixins/listPage'
+import listPage from '../../../mixins/listPage';
 
 export default {
   name: 'index',
@@ -120,18 +112,25 @@
         },
         {
           type: 'select',
+          dataIndex: 'goodsTemplateId',
+          label: '鐗╁搧鍚嶇О',
+          placeholder: '璇疯緭鍏�',
+          defaultValue: '',
+          options: [],
+          optionsConfig: {
+            label: 'goodsName',
+            value: 'id',
+            url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
+          },
+        },
+        {
+          type: 'cascader',
           dataIndex: 'agencyId',
           label: '鍒嗗彂閮ㄩ棬',
           placeholder: '璇烽�夋嫨',
+          optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
           defaultValue: '',
           options: [],
-        },
-        {
-          type: 'text',
-          dataIndex: 'goodsTemplateName',
-          label: '鐗╁搧鍚嶇О',
-          placeholder: '鍙ā绯婃悳绱�',
-          defaultValue: '',
         },
         {
           type: 'text',
@@ -154,26 +153,11 @@
         },
       ],
       // 鏍戞暟鎹�
-      treeDataList: [],
-      // 瀵煎叆
-      importSetting: {
-        dialogTitle: '瀵煎叆',
-        dialogShow: false,
-        fileSettings: {
-          data: {},
-          uploadUrl: getBaseUrl() + '/pc/fin/sys/tenant/import', // 涓婁紶鍦板潃
-          accept: '.xls', // 鏍煎紡
-          type: 'text', // 鍥炴樉褰㈠紡
-          loading: false, // 瀵煎叆鏁堟灉
-        },
-        /* 妯℃澘涓嬭浇 */
-        templateSettings: {
-          templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О
-          templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate', // 涓嬭浇鍦板潃
-        },
-        onSuccess: null,
-      },
+      treeDataList: []
     };
+  },
+  created(){
+    this.fetchData()
   },
   methods: {
     fetchData() {
@@ -189,41 +173,6 @@
         console.log(this.list);
       });
     },
-
-    //瀵煎叆
-    importOrg() {
-      this.importSetting.dialogShow = true;
-      this.importSetting.onSuccess = (response, callBack) => {
-        if (response.code === 1) {
-          this.$message.success(response.msg);
-          this.search(1);
-        } else {
-          this.$message.warning(response.msg);
-        }
-        callBack();
-      };
-    },
-    // 鍒嗗彂
-    handleIncome(row) {
-      this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode}  鍒嗗彂鍚�?`, '鍒嗗彂鍒嗗彂').then(() => {
-        procureIncome({ id: row.id })
-          .then((res) => {
-            this.$message.success('鍒嗗彂鎴愬姛锛�');
-            this.search();
-          })
-          .catch(() => {});
-      });
-    },
-    del(row) {
-      this.$modal.confirm('鏄惁纭鍒犻櫎鍒嗗彂鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then( () => {
-        procureDel({ id: row.id })
-          .then((res) => {
-            this.$message.success('鍒犻櫎鎴愬姛锛�');
-            this.search();
-          })
-          .catch(() => {});
-      });
-    },
     fifterForm(params) {
       this.filterFrom = Object.assign(this.filterFrom, params);
       if (this.filterFrom.incomeTimeStart) {
@@ -232,9 +181,6 @@
       if (this.filterFrom.incomeTimeEnd) {
         this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, '');
       }
-      if (this.filterFrom.agencyId && this.filterFrom.agencyId.length) {
-        this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1];
-      }
       this.search(1);
     },
   },
@@ -242,5 +188,5 @@
 </script>
 
 <style scoped lang="scss">
-@import url(../../../../styles/store.scss);
+  //@import url(../../../../styles/index.scss);
 </style>

--
Gitblit v1.9.1