From 386878d3b2c54585c3d572ff34b3d5831d5175a1 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期三, 22 十一月 2023 14:50:44 +0800
Subject: [PATCH] 供应商管理-请求头添加token
---
src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue | 60 ++++++++++++++++++++++++++++++++++++------------------------
1 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
index 0c11b8c..0f57884 100644
--- a/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
+++ b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
@@ -31,7 +31,9 @@
>
</TableCommonView>
<div slot="footer" class="dialog-footer">
- <div class="remark">璇存槑锛氭敮鎸佸瀛楁妯$硦鏌ヨ锛屼粎鏄剧ず绗﹀悎鏉′欢鐨勫墠5鏉℃暟鎹�</div>
+ <div class="btn-pager">
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
</div>
</div>
</el-dialog>
@@ -40,8 +42,11 @@
<script>
import { getSupplierList } from "@/api/supplierManage/supplier"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+
export default {
name: "EditSelClientDialog",
+ mixins: [pageMixin],
props: {
editCommonConfig: {
type: Object,
@@ -58,7 +63,7 @@
computed: {},
data() {
return {
- dialogWidth: "50%",
+ dialogWidth: "40%",
editConfig: this.editCommonConfig,
queryInput: "",
select: "1",
@@ -69,8 +74,8 @@
tableList: {},
search_map: {},
tableColumn: [
- { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190, isCommonClick: true },
- { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130 },
+ { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190 },
+ { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130, isCommonClick: true },
{ label: "渚涘簲鍟嗙被鍨�", prop: "supplierType", min: 130 },
{ label: "鎵�灞炶涓�", prop: "industry", min: 130 },
{ label: "鑱旂郴浜�", prop: "contact", min: 130 },
@@ -78,25 +83,23 @@
{ label: "鐘舵��", prop: "status_name", min: 130 },
{ label: "鍒涘缓鏃堕棿", prop: "member_name", min: 130 }
],
- showCol: ['渚涘簲鍟嗙紪鍙�', '渚涘簲鍟嗗悕绉�', '渚涘簲鍟嗙被鍨�', '鎵�灞炶涓�', '鑱旂郴浜�', '鑱旂郴鐢佃瘽','鐘舵��','鍒涘缓鏃堕棿']
-
+ showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "渚涘簲鍟嗙被鍨�", "鑱旂郴浜�", "鑱旂郴鐢佃瘽", "鐘舵��"]
}
},
created() {
this.setTable()
this.getData()
},
- mounted(){
- },
+ mounted() {},
methods: {
setTable() {
this.tableList = {
tableInfomation: [],
- tableColumn:this.setColumnVisible(this.showCol),
+ tableColumn: this.setColumnVisible(this.showCol),
showcol: this.showCol,
- allcol:[]
+ allcol: []
}
- this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
+ this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
this.searchOptions = []
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
const label = this.tableList.tableColumn[i].label
@@ -105,14 +108,14 @@
}
},
selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
},
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
return {
...ele,
- isShowColumn:showCol.includes(ele.label)
+ isShowColumn: showCol.includes(ele.label)
}
})
},
@@ -122,22 +125,24 @@
// 璇锋眰鏁版嵁
async getData(val, content) {
this.loading = true
+
await getSupplierList({
[val]: content,
- page:1,
- pageSize: 10
+ status:1,
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
})
.then((res) => {
- if (res.data.code == 200) {
- if (res.data.data.list && res.data.data.list.length > 0) {
- const list = res.data.data.list.map((item) => {
+ if (res.code == 200) {
+ if (res.data.list && res.data.list.length > 0) {
+ const list = res.data.list.map((item) => {
return {
...item,
status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤"
}
})
- // this.tableList.tableInfomation = list.slice(0, 5) || []
this.tableList.tableInfomation = list
+ this.pagerOptions.totalCount = res.data.total
} else {
this.tableList.tableInfomation = []
}
@@ -192,9 +197,16 @@
cursor: pointer;
}
.dialog-footer {
- height: 40px;
- line-height: 40px;
+ height: 50px;
+ line-height: 50px;
color: red;
+ .btn-pager {
+ display: flex;
+ margin-top: 0px;
+ .page {
+ margin-left: auto;
+ }
+ }
}
::v-deep {
.input-with-select .el-input-group__prepend {
--
Gitblit v1.8.0