From 5eeb8864bebb1dc4f97f2feef32b742d8a9a10d5 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 14 九月 2022 15:43:04 +0800
Subject: [PATCH] 1.新增报表管理菜单
---
src/views/jcsz/wldw.vue | 121 ++++++++++++++++++++++-----------------
1 files changed, 68 insertions(+), 53 deletions(-)
diff --git a/src/views/jcsz/wldw.vue b/src/views/jcsz/wldw.vue
index bf56201..18c2c7f 100644
--- a/src/views/jcsz/wldw.vue
+++ b/src/views/jcsz/wldw.vue
@@ -2,14 +2,16 @@
<div>
<div class="body" :style="{height:mainHeight+'px'}">
- <div class="bodyTopButtonGroup">
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <el-button
- icon="el-icon-refresh-right"
- @click="syncSeaveSearchPartner"
- >鍚屾寰�鏉ュ崟浣�
- </el-button>
- <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+ <div style="display: flex">
+ <el-button
+ icon="el-icon-refresh-right"
+ @click="syncSeaveSearchPartner"
+ >鍚屾寰�鏉ュ崟浣�
+ </el-button>
+ <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
+ </div>
</div>
<div class="bodyTopFormGroup">
@@ -87,59 +89,82 @@
label="鍗曚綅鍚嶇О"
sortable="custom"
min-width="160px"
+ show-tooltip-when-overflow
/>
<el-table-column
label="鍗曚綅灞炴��"
width="240"
>
<!-- sortable="custom"-->
-
- <el-table-column
- prop="mtype"
- width="80"
- >
- <template slot-scope="{row}">
- <div v-if="row.mtype==='WG'">澶栬喘渚涙柟</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="btype"
- width="80"
- >
- <template slot-scope="{row}">
- <div v-if="row.btype==='WX'">澶栧崗渚涙柟</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="htype"
- width="80"
- >
- <template slot-scope="{row}">
+ <template slot-scope="{row}">
+ <div style="display: flex;justify-content: flex-start">
+ <div v-if="row.mtype==='WG'" style="margin-right: 15px">澶栬喘渚涙柟</div>
+ <div v-if="row.btype==='WX'" style="margin-right: 15px;">澶栧崗渚涙柟</div>
<div v-if="row.htype==='KH'">瀹㈡埛</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
+ </div>
+ </template>
+ <!-- <el-table-column-->
+ <!-- prop="mtype"-->
+ <!-- width="80"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.mtype==='WG'">澶栬喘渚涙柟</div>-->
+ <!-- <div v-else>/</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <!-- <el-table-column-->
+ <!-- prop="btype"-->
+ <!-- width="80"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.btype==='WX'">澶栧崗渚涙柟</div>-->
+ <!-- <div v-else>/</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <!-- <el-table-column-->
+ <!-- prop="htype"-->
+ <!-- width="80"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div v-if="row.htype==='KH'">瀹㈡埛</div>-->
+ <!-- <div v-else>/</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
</el-table-column>
<el-table-column
prop="conttacts"
label="鑱旂郴浜�"
width="110"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.conttacts">{{ row.conttacts }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="conttphone"
label="鑱旂郴鏂瑰紡"
width="160"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.conttphone">{{ row.conttphone }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="addr"
min-width="160"
label="琛ュ厖鎻忚堪"
+ show-tooltip-when-overflow
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.addr">{{ row.addr }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="lm_user"
label="鍒涘缓浜哄憳"
@@ -172,12 +197,11 @@
</div>
<!--鍒嗛〉-->
<pagination
- v-show="total>0"
:total="total"
:page.sync="form.page"
:limit.sync="form.rows"
align="right"
- layout="prev, pager, next,sizes"
+ layout="total,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getCurrentUnitSearch"
/>
@@ -237,25 +261,13 @@
} from '@/api/jcsz'
import { SeaveSearchPartner } from '@/api/ErpSyncMes'
import ImportPicker from '@/components/ImportPicker'
-
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
+import { validateCode } from '@/utils/global'
export default {
name: 'WLDW',
components: {
Pagination, ImportPicker
},
data() {
- const validateName = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇疯緭鍏ョ紪鐮�'))
- } else {
- if (SER_HZ.test(value)) {
- return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
- } else {
- callback()
- }
- }
- }
const validateMobile = (rule, value, callback) => {
if (!value) {
callback()
@@ -310,7 +322,7 @@
operation: '',
dialogFormRules: {
unitcode: [
- { required: true, validator: validateName, trigger: ['blur', 'change'] }
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
],
unitname: [
{ required: true, message: '璇疯緭鍏ヤ緵鏂瑰悕绉�', trigger: ['blur', 'change'] }
@@ -460,6 +472,9 @@
DeleteCurrentUnit({ unitcode: row.code }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getCurrentUnitSearch()
}
})
--
Gitblit v1.9.3