From dcf9c9e0410fe1186239e3f8d6f7bdc789c08010 Mon Sep 17 00:00:00 2001 From: lzhe <lzhe@example.com> Date: 星期三, 05 六月 2024 18:00:39 +0800 Subject: [PATCH] 1 --- src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue b/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue index b604416..8744660 100644 --- a/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue +++ b/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue @@ -1,21 +1,21 @@ <!-- * @Date: 2024-05-08 21:29:53 * @LastEditors: Sneed - * @LastEditTime: 2024-05-08 23:20:45 + * @LastEditTime: 2024-05-09 21:12:56 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue --> <template> <el-containter> <el-header> <el-button @click="table_add" type="primary" icon="el-icon-plus"></el-button> - <el-button type="primary">瀵煎叆</el-button> - <el-button type="primary">瀵煎嚭</el-button> + <!-- <el-button type="primary">瀵煎叆</el-button> --> + <import-table style="margin:0 8px" :exportUrl="exportUrl" :uploadUrl="uploadUrl"></import-table> + <el-button type="primary" @click="getExport">瀵煎嚭</el-button> <el-popconfirm width="220" cancel-button-text="鍋滅敤" confirm-button-text="鍒犻櫎" title="鍒犻櫎鏁版嵁浼氬奖鍝嶅凡鍏宠仈鐨勪笟鍔� ,鑻ユ偍鎯冲湪宸插叧鑱旂殑涓氬姟涓緷鐒舵樉绀鸿繖浜涙暟鎹�, 鎮ㄥ彲浠ラ�夋嫨 鍋滅敤 鎿嶄綔銆傚仠鐢ㄥ悗姝ゆ暟鎹皢涓嶈兘鍐嶈鏂颁笟鍔′娇鐢ㄣ��" @confirm="table_del(selection, '0')" @cancel="table_del(selection, '1')"> <template #reference> - <el-button :disabled="selection.length == 0" type="danger" plain icon="el-icon-delete" - @click="batchDel"></el-button> + <el-button :disabled="selection.length == 0" type="danger" plain icon="el-icon-delete"></el-button> </template> </el-popconfirm> @@ -52,7 +52,7 @@ <el-table-column prop="stuff" label="鏉愯川" /> <el-table-column prop="property" label="鐗╂枡灞炴��"> <template #default="scope"> - {{ this.options.property.find(v => v.value == scope.row.property).label }} + {{ this.options.property.find(v => v.value == scope.row.property)?.label }} </template> </el-table-column> <el-table-column prop="isMustCheckName" label="鏄惁蹇呮"> @@ -162,10 +162,15 @@ </template> <script> +import importTable from '@/layout/components/importTable.vue' export default { + components: { + importTable, + }, data() { return { - activeName: '1', + uploadUrl: "/api/blade-cps/material/import-material", + exportUrl: "/api/blade-cps/material/export-template", options: { status: [ { @@ -248,8 +253,12 @@ ...row } }, - batchDel() { - + getExport() { + this.$HTTP.post(`/api/blade-cps/material/export-material`, { ...this.params }).then(res => { + if (res.code == 200) { + window.open(res.data.link); + } + }).catch(() => { }) }, dataChange() { -- Gitblit v1.9.3