From 17d7043f10d55429db919238fe639bff1b51ec0e Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期五, 07 二月 2025 15:59:37 +0800 Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1 --- admin/src/views/stock/components/inventoryDetails.vue | 8 ++- admin/src/api/client/staff.js | 8 ++++ admin/src/views/operation/record.vue | 35 ++++++++++++++--- admin/src/api/store/index.js | 5 +- admin/src/views/client/staffList.vue | 23 +++++++++++ 5 files changed, 67 insertions(+), 12 deletions(-) diff --git a/admin/src/api/client/staff.js b/admin/src/api/client/staff.js index 5b40176..7d57949 100644 --- a/admin/src/api/client/staff.js +++ b/admin/src/api/client/staff.js @@ -20,6 +20,14 @@ }) } +// 瀵煎嚭Excel +export function ywExportExcel (data) { + return request.post('/visitsAdmin/cloudService/business/member/ywExportExcel', data, { + trim: true, + download: true + }) +} + // 鍒涘缓 export function create (data) { return request.post('/visitsAdmin/cloudService/business/member/ywCreate', data) diff --git a/admin/src/api/store/index.js b/admin/src/api/store/index.js index 0b2aa17..03aac7a 100644 --- a/admin/src/api/store/index.js +++ b/admin/src/api/store/index.js @@ -29,7 +29,8 @@ } export function ywStockPageEx (data) { return request.post('/visitsAdmin/cloudService/business/ywStock/exportExcel', data, { - trim: true + trim: true, + download: true }) } @@ -42,4 +43,4 @@ return request.post('/visitsAdmin/cloudService/business/ywOutinboundRecord/exportExcel', data, { trim: true }) -} \ No newline at end of file +} diff --git a/admin/src/views/client/staffList.vue b/admin/src/views/client/staffList.vue index e3be587..fdb031d 100644 --- a/admin/src/views/client/staffList.vue +++ b/admin/src/views/client/staffList.vue @@ -70,6 +70,7 @@ import OperaYwCustomerWindow from './components/staffEdit.vue' import { fetchList } from '@/api/client/ywCustomer' import { updateStatusById } from '@/api/business/member' +import { ywExportExcel } from '@/api/client/staff' import { Message } from 'element-ui' export default { name: 'YwCustomer', @@ -113,6 +114,28 @@ this.clientList = res.records || [] }) }, + exportExcel () { + this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵') + .then(() => { + this.isWorking.export = true + ywExportExcel({ + page: this.tableData.pagination.pageIndex, + capacity: 1000000, + model: this.searchForm, + sorts: this.tableData.sorts + }) + .then(response => { + this.download(response) + }) + .catch(e => { + this.$tip.apiFailed(e) + }) + .finally(() => { + this.isWorking.export = false + }) + }) + .catch(() => {}) + }, } } </script> diff --git a/admin/src/views/operation/record.vue b/admin/src/views/operation/record.vue index 37c421a..a7f872b 100644 --- a/admin/src/views/operation/record.vue +++ b/admin/src/views/operation/record.vue @@ -4,7 +4,7 @@ <div class="mt20"> <el-button type="primary" @click="handleEdit()" icon="el-icon-plus" v-permissions="['business:ywpatrolline:create']">鏂板缓</el-button> - <el-button type="primary" @click="handleEx" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button> + <el-button type="primary" @click="exportExcel" :loading="isWorking.export" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button> </div> <el-table v-loading="loading" :data="list" stripe> <el-table-column prop="realName" label="杩愮淮浜�" min-width="100" show-overflow-tooltip /> @@ -38,7 +38,8 @@ import QueryForm from '@/components/common/QueryForm' import Edit from './components/maintain.vue' import Detail from './components/maintainDetail.vue' -import { fetchList, deleteById } from '@/api/Inspection/deviceRecord' +import { fetchList, deleteById, exportExcel } from '@/api/Inspection/deviceRecord' +import { ywExportExcel } from '@/api/client/staff' export default { components: { Pagination, @@ -73,6 +74,9 @@ }, ], online: true + }, + isWorking: { + export: false } } }, @@ -100,9 +104,6 @@ this.loading = false }) }, - handleEx() { - - }, handleEdit(row) { this.showEdit = true this.$nextTick(() => { @@ -111,7 +112,6 @@ this.$refs.EditRef.getDetail(row.id) } }) - }, handleDetail(row) { this.$refs.DetailRef.visible = true @@ -139,7 +139,28 @@ handleSizeChange(capacity) { this.pagination.pageSize = capacity this.getList() - } + }, + exportExcel () { + this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵') + .then(() => { + this.isWorking.export = true + exportExcel({ + page: this.pagination.page, + capacity: 1000000, + model: this.filters + }) + .then(response => { + this.download(response) + }) + .catch(e => { + this.$tip.apiFailed(e) + }) + .finally(() => { + this.isWorking.export = false + }) + }) + .catch(() => {}) + }, } } </script> diff --git a/admin/src/views/stock/components/inventoryDetails.vue b/admin/src/views/stock/components/inventoryDetails.vue index b47d41c..c5b03c4 100644 --- a/admin/src/views/stock/components/inventoryDetails.vue +++ b/admin/src/views/stock/components/inventoryDetails.vue @@ -36,7 +36,7 @@ <div class="list"> <div class="list_search"> <div class="list_search_left"> - <el-input v-model="form.code" style="width: 200px; margin-right: 10px;" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�/缂栫爜"></el-input> + <el-input v-model="form.materialCode" style="width: 200px; margin-right: 10px;" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�/缂栫爜"></el-input> <el-select v-model="form.status" style="width: 150px; margin-right: 10px;" placeholder="鐩樼偣鐘舵��"> <el-option label="宸茬洏" :value="1"></el-option> <el-option label="鏈洏" :value="0"></el-option> @@ -110,7 +110,7 @@ info: {}, list: [], form: { - code: '', + materialCode: '', status: '', type: '' }, @@ -145,6 +145,7 @@ this.form.name = '' this.form.status = '' this.form.type = '' + this.form.materialCode = '' this.page = 1 this.getList() }, @@ -154,12 +155,13 @@ page: this.page, model: { stocktakingId: this.id, - code: this.form.code, + materialCode: this.form.materialCode, status: this.form.status, type: this.form.type } }).then(res => { this.list = res.records + this.total = res.total }) } } -- Gitblit v1.9.3