From b4adff68a07b783fc90da1c9370d8be5f383e700 Mon Sep 17 00:00:00 2001 From: 黎星凯 <13949086503@163.com> Date: 星期三, 08 五月 2024 13:46:34 +0800 Subject: [PATCH] 20240528修改: bug41、42、43修改 领用单(分发单),调拨单,流程优化 --- admin-web/src/views/stock/transfer/transferApplication/index.vue | 65 +++++++++++++++++++++++++++++++- 1 files changed, 63 insertions(+), 2 deletions(-) diff --git a/admin-web/src/views/stock/transfer/transferApplication/index.vue b/admin-web/src/views/stock/transfer/transferApplication/index.vue index af1e2c1..3b16249 100644 --- a/admin-web/src/views/stock/transfer/transferApplication/index.vue +++ b/admin-web/src/views/stock/transfer/transferApplication/index.vue @@ -21,7 +21,8 @@ <div class="card-header-left"> <span>璋冩嫧鍗曞彿锛�</span> <span class="value">{{ item.businessFormCode }}</span> - <div v-if="item.states == 0" class="states states-warning">寰呭嚭搴�</div> + <div v-if="item.states == 0 && item.procureDoc !=null" class="states states-warning">寰呭嚭搴�</div> + <div v-if="item.states == 0 && item.procureDoc ==null" class="states states-warning">寰呮彁浜�</div> <div v-if="item.states == 1" class="states states-warning">寰呮帴鏀�</div> <div v-if="item.states == 2" class="states states-success">宸叉帴鏀�</div> <div v-if="item.states == 4" class="states states-info">宸叉挙閿�</div> @@ -35,6 +36,22 @@ @click="handleIncome(item)" >鍏ュ簱</el-button > + + <el-button v-if="item.states == 0 && item.procureDoc ==null" site="form" type="primary" size="mini" + @click="handleExport('transferExport',`璋冩嫧鍗�-${item.businessFormCode}`, {id:item.id,type:0})" + >涓嬭浇 + </el-button + > + + <el-button + v-if="item.states == 0 && item.procureDoc ==null" + site="form" + type="primary" + size="mini" + @click="handleUploadPage(item)" + >涓婁紶</el-button + > + <el-button v-if="item.states == 0" site="form" @@ -103,6 +120,16 @@ </el-row> </el-card> </el-container> + + <!-- 涓婁紶鍒嗗彂鍗曟枃浠�--> + <uploadPage + v-if="uploadPageSetting.show" + :setting="uploadPageSetting" + ref="uploadRef" + @close="uploadPageSetting.show = false" + @search="refreshData" + ></uploadPage> + <!--娣诲姞/缂栬緫寮圭獥--> <edit v-if="editSetting.show" @@ -129,11 +156,14 @@ import listPage from '@/views/mixins/listPage'; import transfer from '@/views/mixins/transfer'; import SettingIplatform from '@/utils/settingIplatform'; +import uploadPage from './uploadPage'; +import * as dataExport from "@/api/exportExcel"; +import {downLoad} from "@/utils/base"; export default { name: 'index', mixins: [listPage, transfer], - components: { MyButton, myImport, edit, detail }, + components: { MyButton, myImport, edit, detail,uploadPage }, data() { return { loading: false, @@ -255,6 +285,37 @@ }); }); }, + // 瀵煎叆 + handleUploadPage(row) { + this.uploadPageSetting.id = row.id; + this.uploadPageSetting.title = '瀵煎叆'; + this.uploadPageSetting.show = true; + }, + /** + * 瀵煎嚭璋冩嫧鍏ュ簱鍗� + * @param api + * @param fileName + * @param params + */ + handleExport(api, fileName, params) { + let loading = this.$loading({ + lock: true, + text: '瀵煎嚭涓紝璇风◢鍊�...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)', + }); + // 鍒ゆ柇鎬绘潯鏁版槸鍚﹀ぇ浜庢渶澶ф敮鎸佹潯鏁� + dataExport[api](params) + .then((res) => { + console.log(res) + downLoad(res) + this.$message.success('瀵煎嚭鎴愬姛锛�'); + loading.close(); + }) + .catch(() => { + loading.close(); + }); + }, }, }; </script> -- Gitblit v1.9.1