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/procure/purchaseOrder/index.vue | 93 ++++------------------------------------------ 1 files changed, 8 insertions(+), 85 deletions(-) diff --git a/admin-web/src/views/stock/procure/purchaseOrder/index.vue b/admin-web/src/views/stock/procure/purchaseOrder/index.vue index 039e815..621f136 100644 --- a/admin-web/src/views/stock/procure/purchaseOrder/index.vue +++ b/admin-web/src/views/stock/procure/purchaseOrder/index.vue @@ -13,8 +13,8 @@ <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" /> <my-button name="瀵煎叆" @click="importSetting.dialogShow = true" site="tools" size="medium" /> </div> - <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }"> - <el-row class="card" :gutter="5" v-loading="loading"> + <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" 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"> <div class="card-container"> @@ -74,6 +74,7 @@ </el-card> </el-col> </el-row> + <div class="no-data" v-else>鏆傛棤鏁版嵁</div> </div> <el-pagination :small="false" @@ -113,17 +114,17 @@ <script> import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; -import { getTree } from '@/api/baseSetting/finsystenant'; 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 { @@ -157,7 +158,7 @@ }, { type: 'text', - dataIndex: 'buyerName', + dataIndex: 'createName', label: '鍒涘缓浜�', placeholder: '璇疯緭鍏�', defaultValue: '', @@ -198,13 +199,6 @@ ], // 鏍戞暟鎹� treeDataList: [], - // 鎼滅储鏉′欢 - filterFrom: { - tenantId: null, - userName: null, - userPhone: null, - states: null, - }, // 瀵煎叆 importSetting: { dialogTitle: '瀵煎叆', @@ -223,35 +217,7 @@ }, 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() { @@ -281,27 +247,6 @@ 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.show = true; - }, // 鍏ュ簱 handleIncome(row) { this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鍏ュ簱鍚�?`, '閲囪喘鍏ュ簱').then(() => { @@ -323,28 +268,6 @@ .catch(() => {}); }); }, - // 鍒嗛〉 - handleSizeChange(pageSize) { - this.pageSize = pageSize; - this.pageNum = 1; - this.search(); - }, - handleCurrentChange(pageNum) { - this.pageNum = pageNum; - this.search(pageNum); - }, - // 鏌ヨ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) { @@ -353,10 +276,10 @@ if (this.filterFrom.incomeTimeEnd) { this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.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(); + this.search(1); }, }, }; -- Gitblit v1.9.1