From 1e9fa82cb2fe2c15f46bd1dd73f5c878c74b83b8 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 04 八月 2022 15:35:50 +0800
Subject: [PATCH] 1.系统多账号登录问题2.采购订单页面样式修改及数据渲染
---
src/views/jcsz/wldw.vue | 122 +++++++++++++++++++++++++++++++++++-----
1 files changed, 106 insertions(+), 16 deletions(-)
diff --git a/src/views/jcsz/wldw.vue b/src/views/jcsz/wldw.vue
index 3b1de99..d7961cd 100644
--- a/src/views/jcsz/wldw.vue
+++ b/src/views/jcsz/wldw.vue
@@ -17,7 +17,13 @@
<el-input v-model="form.CuntUnitName" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
<el-form-item label="鍗曚綅灞炴��" style=" display: flex;">
- <el-select v-model="form.UnitAttr":popper-append-to-body="false" filterable style="width: 200px" placeholder="璇烽�夋嫨">
+ <el-select
+ v-model="form.UnitAttr"
+ :popper-append-to-body="false"
+ filterable
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ >
<el-option
v-for="item in UnitAttrArr"
:key="item.value"
@@ -39,14 +45,20 @@
<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">瀵煎叆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-refresh-right"
+ @click="syncSeaveSearchPartner"
+ >鍚屾寰�鏉ュ崟浣�
+ </el-button>
+ <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
</div>
<el-divider />
<div class="elTableDiv">
<el-table
:data="tableData"
border
- :height="tableHeight"
+ :height="tableHeight+'px'"
stripe
highlight-current-row
:header-cell-style="this.$headerCellStyle"
@@ -61,28 +73,30 @@
<el-table-column
prop="RowNum"
width="50"
+ fixed
label="搴忓彿"
/>
<el-table-column
prop="code"
label="鍗曚綅缂栫爜"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="name"
label="鍗曚綅鍚嶇О"
sortable="custom"
- min-width="200px"
+ min-width="160px"
/>
<el-table-column
label="鍗曚綅灞炴��"
- width="150"
+ width="240"
>
<!-- sortable="custom"-->
<el-table-column
prop="mtype"
- width="120"
+ width="80"
>
<template slot-scope="{row}">
<div v-if="row.mtype==='WG'">澶栬喘渚涙柟</div>
@@ -91,7 +105,7 @@
</el-table-column>
<el-table-column
prop="btype"
- width="120"
+ width="80"
>
<template slot-scope="{row}">
<div v-if="row.btype==='WX'">澶栧崗渚涙柟</div>
@@ -100,7 +114,7 @@
</el-table-column>
<el-table-column
prop="htype"
- width="120"
+ width="80"
>
<template slot-scope="{row}">
<div v-if="row.htype==='KH'">瀹㈡埛</div>
@@ -111,31 +125,36 @@
<el-table-column
prop="conttacts"
label="鑱旂郴浜�"
+ width="110"
sortable="custom"
/>
<el-table-column
prop="conttphone"
label="鑱旂郴鏂瑰紡"
+ width="160"
sortable="custom"
/>
<el-table-column
prop="addr"
+ min-width="160"
label="琛ュ厖鎻忚堪"
sortable="custom"
/>
<el-table-column
prop="lm_user"
label="鍒涘缓浜哄憳"
+ width="110"
sortable="custom"
/>
<el-table-column
prop="lm_date"
label="鍒涘缓鏃堕棿"
sortable="custom"
- width="200"
+ width="160"
/>
<el-table-column
label="鎿嶄綔"
+ fixed="right"
>
<template slot-scope="{row}">
<div class="operationClass">
@@ -199,6 +218,10 @@
</div>
</span>
</el-dialog>
+
+ <!--瀵煎叆缁勪欢-->
+ <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
+
</div>
</template>
@@ -207,12 +230,14 @@
import {
AddUpdateCurrentUnit, CurrentUnitSearch, DeleteCurrentUnit
} from '@/api/jcsz'
+import { SeaveSearchPartner } from '@/api/ErpSyncMes'
+import ImportPicker from '@/components/ImportPicker'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'WLDW',
components: {
- Pagination
+ Pagination, ImportPicker
},
data() {
const validateName = (rule, value, callback) => {
@@ -223,6 +248,22 @@
return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
} else {
callback()
+ }
+ }
+ }
+ const validateMobile = (rule, value, callback) => {
+ if (!value) {
+ callback()
+ // return callback(new Error('璇疯緭鍏ョ數璇濆彿鐮�'))
+ } else {
+ const mobile = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // 闀垮彿
+ const mobile2 = /^[0-9]{6}$/ // 鐭彿
+ if (mobile.test(value) || mobile2.test(value)) {
+ callback()
+ // return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
+ } else {
+ return callback(new Error('鐢佃瘽鍙风爜涓嶇鍚堣鍒�'))
+ // callback()
}
}
}
@@ -271,9 +312,22 @@
],
checkboxIsSelected: [
{ required: true, message: '璇烽�夋嫨渚涙柟灞炴��', trigger: ['blur', 'change'] }
+ ],
+ contact: [
+ { required: false, validator: validateMobile, trigger: ['blur', 'change'] }
]
- }
+ },
+ title_value: '鏁版嵁瀵煎叆 / 寰�鏉ュ崟浣�',
+ code: '4',
+ shows: false
+ }
+ },
+ watch: {
+ shows() {
+ if (!this.shows) {
+ this.getCurrentUnitSearch()
+ }
}
},
created() {
@@ -303,6 +357,29 @@
const res = await CurrentUnitSearch(this.form)
this.tableData = res.data
this.total = res.count
+ },
+ // 鍚屾寰�鏉ュ崟浣�
+ async syncSeaveSearchPartner() {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍚屾寰�鏉ュ崟浣嶏紝璇风◢绛�...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const res = await SeaveSearchPartner()
+ if (res.code === '200') {
+ setTimeout(() => {
+ this.getCurrentUnitSearch()
+ loading.close()
+ this.$message.success('鍚屾鎴愬姛锛�')
+ }, 2000)
+ } else {
+ setTimeout(() => {
+ loading.close()
+ this.$message.error('鍚屾澶辫触锛�')
+ }, 10000)
+ }
},
// 鎺掑簭鏀瑰彉鏃�
sortChange({ column, prop, order }) {
@@ -447,6 +524,14 @@
this.mainHeight = window.innerHeight - 250
this.tableHeight = this.mainHeight - 100
})
+ },
+ // 瀵煎叆鎸夐挳
+ upload() {
+ this.shows = true
+ this.$refs.importPickerFunc.newDataFunc()
+ },
+ colos() {
+ this.shows = false
}
}
}
@@ -463,9 +548,11 @@
border: none;
padding: 0 20px;
}
+
::v-deep .el-button--primary:hover {
border: none;
}
+
::v-deep .el-button--info {
//background-color: $main_color !important;
height: 30px;
@@ -473,6 +560,7 @@
align-items: center;
padding: 0 20px;
}
+
::v-deep .el-input__inner:focus {
border-color: $main_color;
}
@@ -592,7 +680,7 @@
margin: 10px auto;
}
-.body ::v-deep .el-form-item{
+.body ::v-deep .el-form-item {
margin-bottom: 0;
}
@@ -600,17 +688,19 @@
border-color: $main_color;
}
-::v-deep .el-select .el-input__inner:focus{
+::v-deep .el-select .el-input__inner:focus {
border-color: $main_color;
}
-::v-deep .el-select-dropdown__item.selected{
+::v-deep .el-select-dropdown__item.selected {
color: $main_color;
}
-::v-deep .el-checkbox__inner:hover{
+
+::v-deep .el-checkbox__inner:hover {
border-color: $main_color;
}
-::v-deep .el-textarea__inner:focus{
+
+::v-deep .el-textarea__inner:focus {
border-color: $main_color;
}
--
Gitblit v1.9.3