From 4bcf7f5cbc8185b10e773feda6bee90fe3f32137 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 22 七月 2022 15:50:21 +0800
Subject: [PATCH] 1.文件上传校验导入实现一个demo2.修改bug
---
src/views/wlgl/ckdy.vue | 37 ++++++++++++++++++++++++++++++++++---
1 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/src/views/wlgl/ckdy.vue b/src/views/wlgl/ckdy.vue
index 1c2beaf..beabeaa 100644
--- a/src/views/wlgl/ckdy.vue
+++ b/src/views/wlgl/ckdy.vue
@@ -32,7 +32,13 @@
<el-divider />
<div style="margin-left: 10px;display: flex">
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-refresh-right"
+ @click="syncSeaveSearchWhareHouseLocation"
+ >鍚屾浠撳簱/搴撲綅
+ </el-button>
+ <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
</div>
<el-divider />
<div class="elTableDiv">
@@ -40,7 +46,7 @@
:data="tableData"
border
stripe
- :height="tableHeight"
+ :height="tableHeight+'px'"
:style="{width: 100+'%',height:tableHeight+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
@@ -80,6 +86,7 @@
prop="lm_date"
label="鍒涘缓鏃堕棿"
sortable="custom"
+ width="160"
/>
<el-table-column
label="鎿嶄綔"
@@ -139,10 +146,11 @@
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateWareHouseDef, DeleteWareHouseDef, WareHouseDefSearch } from '@/api/wlgl'
+import { SeaveSearchWhareHouseLocation } from '@/api/ErpSyncMes'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
- name: 'Zzjg',
+ name: 'CKDY',
components: {
Pagination
},
@@ -207,6 +215,29 @@
this.tableData = res.data
this.total = res.count
},
+ // 鍚屾浠撳簱/搴撲綅
+ async syncSeaveSearchWhareHouseLocation() {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍚屾浠撳簱/搴撲綅锛岃绋嶇瓑...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const res = await SeaveSearchWhareHouseLocation()
+ if (res.code === '200') {
+ setTimeout(() => {
+ this.getWareHouseDefSearch()
+ loading.close()
+ this.$message.success('鍚屾鎴愬姛锛�')
+ }, 2000)
+ } else {
+ setTimeout(() => {
+ loading.close()
+ this.$message.error('鍚屾澶辫触锛�')
+ }, 10000)
+ }
+ },
// 鎺掑簭鏀瑰彉鏃�
sortChange({ column, prop, order }) {
if (order === 'descending') {
--
Gitblit v1.9.3