From 94de1745b4b69eeeb1ac8c5d3508ce87258afc25 Mon Sep 17 00:00:00 2001
From: haoyahui <2032914783@qq.com>
Date: 星期四, 16 十一月 2023 09:22:06 +0800
Subject: [PATCH] 库存管理

---
 admin-web/src/views/stock/accessStock/outbound/index.vue |  183 ++++-----------------------------------------
 1 files changed, 19 insertions(+), 164 deletions(-)

diff --git a/admin-web/src/views/stock/accessStock/outbound/index.vue b/admin-web/src/views/stock/accessStock/outbound/index.vue
index 30595e1..32d8b6a 100644
--- a/admin-web/src/views/stock/accessStock/outbound/index.vue
+++ b/admin-web/src/views/stock/accessStock/outbound/index.vue
@@ -32,15 +32,15 @@
                         </div>
                       </div>
                       <div class="one-hed">
-                        <div class="box"><span class="span-two">鏈烘瀯锛�</span>{{ item.agencyId }}</div>
-                        <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.buyerName }}</div>
+                        <div class="box"><span class="span-two">鏈烘瀯锛�</span>{{ item.agencyName }}</div>
+                        <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.operatorName }}</div>
                         <div class="box">
-                          <span class="span-two">鍑哄簱鏃堕棿锛�</span>{{ item.procureTime | formatTime }}
+                          <span class="span-two">鍑哄簱鏃堕棿锛�</span>{{ item.dealTime | formatTime }}
                         </div>
                       </div>
                       <div class="card-end">
-                        <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item">
-                          <div class="name">{{ just.goodsTemplateName }}</div>
+                        <div v-for="(just, index) in item.formOutputTemplateInfoList" :key="index" class="item">
+                          <div class="name">{{ just.goodsName }}</div>
                           <div class="value-box">
                             <div class="value-box-item">
                               <span class="label">鏁伴噺锛�</span>
@@ -72,32 +72,24 @@
     </el-container>
     <!--娣诲姞/缂栬緫寮圭獥-->
     <edit v-if="editSetting.show" :setting="editSetting" ref="editRef" @close="editSetting.show=false" @search="refreshData"></edit>
-    <detail v-if="detailSetting.show" :setting="detailSetting" @close="editSetting.show=false" ref="detailRef"></detail>
-    <my-import
-      :import-setting="importSetting"
-      :dialog-show="importSetting.dialogShow"
-      :dialog-title="importSetting.dialogTitle"
-    />
+    <detail v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show=false" ref="detailRef"></detail>
   </div>
 </template>
 
 <script>
-import { outputList, procureDel, procureIncome } from '@/api/stock/accessStock';
+import { outputList } from '@/api/stock/accessStock';
 import MyButton from '@/components/myButton/myButton';
-import SettingIplatform from '@/utils/settingIplatform';
 import myImport from '@/views/components/myImport';
 import edit from './edit';
 import detail from './detail';
-import { getBaseUrl } from '@/utils/base';
-import * as DateFormatter from '@/utils/DateFormatter';
+import listPage from '../../../mixins/listPage'
 
 export default {
   name: 'index',
+  mixins: [listPage],
   components: { MyButton, myImport, edit, detail },
   data() {
     return {
-      loading: false,
-      adddialog: false,
       list: [],
       // 鎼滅储妗�
       items: [
@@ -110,7 +102,7 @@
         },
         {
           type: 'text',
-          dataIndex: 'goodsTemplateName',
+          dataIndex: 'goodsName',
           label: '鐗╁搧鍚嶇О',
           placeholder: '鍙ā绯婃悳绱�',
           defaultValue: '',
@@ -126,81 +118,25 @@
         },
         {
           type: 'text',
-          dataIndex: 'buyerName',
+          dataIndex: 'createName',
           label: '鍒涘缓浜�',
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
         },
         {
           type: 'date-picker',
-          dataIndex: 'val1',
+          dataIndex: 'startTime',
           label: '鍑哄簱鏃堕棿',
           defaultValue: '',
         },
         {
           type: 'date-picker',
-          dataIndex: 'val2',
+          dataIndex: 'endTime',
           label: '鑷�',
           defaultValue: '',
         },
       ],
-      // 鏍戞暟鎹�
-      treeDataList: [],
-      // 鎼滅储鏉′欢
-      filterFrom: {
-        tenantId: null,
-        userName: null,
-        userPhone: null,
-        states: null,
-      },
-      // 瀵煎叆
-      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,
-      },
-      editSetting: {
-        title: '',
-        id: '',
-        orgId: '',
-        show: false,
-      },
-      detailSetting: {
-        title: '璇︽儏',
-        id: '',
-        show: false,
-      },
-      pageNum: 1,
-      pageSize: 10,
-      total: 0,
     };
-  },
-  computed: {
-    clientHeight() {
-      return document.documentElement.clientHeight;
-    },
-  },
-  filters: {
-    formatTime(time) {
-      if (!time) return;
-      return DateFormatter.LongToDateTime(time);
-    },
-  },
-  created() {
-    this.fetchData();
-
   },
   methods: {
     fetchData() {
@@ -213,101 +149,20 @@
         this.list = res.datas;
         this.total = res.totalRows;
         this.loading = false;
-        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();
-      };
-    },
-    // 瀵煎嚭
-    handleExport() {},
-    // 鏂板
-    handleAdd() {
-      this.editSetting.id = null;
-      this.editSetting.info = null;
-      this.editSetting.title = '鏂板';
-      this.editSetting.show = true;
-    },
-    // 缂栬緫
-    handleEdit(row) {
-      this.editSetting.id = row.id;
-      this.editSetting.info = null;
-      this.editSetting.title = '缂栬緫';
-      this.editSetting.show = true;
-    },
-    // 璇︽儏
-    handleDetail(row) {
-      this.detailSetting.id = row.id;
-      this.detailSetting.info = JSON.stringify(row);
-      this.detailSetting.title = '璇︽儏';
-      this.detailSetting.show = true;
-    },
-    // 鍑哄簱
-    handleIncome(row) {
-      this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode}  鍑哄簱鍚�?`, '鍑哄簱鍑哄簱')
-        .then(function () {
-          procureIncome({ id: row.id }).then((res) => {
-            this.$message.success('鍑哄簱鎴愬姛锛�');
-            this.search();
-          });
-        })
-        .catch(() => {});
-    },
-    del(row) {
-      this.$modal
-        .confirm('鏄惁纭鍒犻櫎鍑哄簱鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�')
-        .then(function () {
-          procureDel({ id: row.id }).then((res) => {});
-        })
-        .then((res) => {
-          this.$message.success('鍒犻櫎鎴愬姛锛�');
-          this.search();
-        })
-        .catch(() => {});
-    },
-    // 鍒嗛〉
-    handleSizeChange(pageSize) {
-      this.pageSize = pageSize;
-      this.search({ pageNum: 1 });
-    },
-    handleCurrentChange(pageNum) {
-      this.pageNum = pageNum;
-      this.search();
-    },
-    // 鏌ヨtable鍒楄〃
-    search(pageNum) {
-      if(pageNum){
-        this.pageNum = pageNum
-      }
-      this.fetchData();
-    },
-    refreshData() {
-      this.pageNum = 1;
-      this.pageSize = 10;
-      this.search();
     },
     fifterForm(params) {
       this.filterFrom = Object.assign(this.filterFrom, params);
-      if (this.filterFrom.incomeTimeStart) {
-        this.filterFrom.incomeTimeStart = this.filterFrom.incomeTimeStart.replace(/\-/g, '');
+      if (this.filterFrom.startTime) {
+        this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, '');
       }
-      if (this.filterFrom.incomeTimeEnd) {
-        this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, '');
+      if (this.filterFrom.endTime) {
+        this.filterFrom.endTime = this.filterFrom.endTime.replace(/\-/g, '');
       }
-      if (this.filterFrom.agencyId.length) {
+      if (this.filterFrom.agencyId&&this.filterFrom.agencyId.length) {
         this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1];
       }
-      this.search({ pageNum: 1 });
+      this.search(1);
     },
   },
 };

--
Gitblit v1.9.1