From 4e5f6381bfedbbd8060101f2b63be46cf1c81a0a Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期日, 28 四月 2024 17:22:53 +0800
Subject: [PATCH] 修改供应商列表分页的设置
---
src/views/supplierManage/outsourceSupplier/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/src/views/supplierManage/outsourceSupplier/index.vue b/src/views/supplierManage/outsourceSupplier/index.vue
index 9b597f7..2e4abaf 100644
--- a/src/views/supplierManage/outsourceSupplier/index.vue
+++ b/src/views/supplierManage/outsourceSupplier/index.vue
@@ -18,8 +18,15 @@
<div class="list-view">
<TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
<template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="160" fixed="right">
+ <el-table-column label="鎿嶄綔" width="150" fixed="right">
<template slot-scope="scope">
+ <el-button
+ v-if="scope.row.tel.length == 0"
+ type="text"
+ size="small"
+ @click="createAccountClick(scope.row)"
+ >鍒涘缓璐﹀彿</el-button
+ >
<el-button v-if="scope.row.status == 1" type="text" size="small" @click="statusModifyClick(scope.row)"
>鍋滅敤</el-button
>
@@ -38,6 +45,12 @@
<!-- <div class="overSpread" v-show="isopen || isCreateShop"></div> -->
<!-- 娣诲姞/缂栬緫澶囦欢 -->
<AddEnterprise ref="add" :showList="showList" :titleName="titleName" :editRow="editRow" @shutdown="shutdown" />
+ <!-- 鍒涘缓璐﹀彿 -->
+ <CreateAccount
+ ref="create"
+ :editRow="createRow"
+ @shutdown="shutCreateDown"
+ />
</div>
</template>
@@ -49,12 +62,14 @@
editOutsideUser
} from "@/api/supplierManage/outsourceSupplier"
import AddEnterprise from "@/views/supplierManage/outsourceSupplier/components/addEnterprise"
+import CreateAccount from "@/views/supplierManage/outsourceSupplier/components/CreateAccount";
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "outsourceManage",
mixins: [pageMixin],
components: {
- AddEnterprise
+ AddEnterprise,
+ CreateAccount
},
beforeMount() {
this.getData()
@@ -106,7 +121,8 @@
"娣诲姞鏃堕棿",
"鐘舵��"
],
- showList: []
+ showList: [],
+ createRow: {},
}
},
mounted() {
@@ -184,6 +200,7 @@
{
label: "缁勭粐鏈烘瀯浠g爜",
prop: "organizationCode",
+ min:140,
isShowColumn: showcol.includes("缁勭粐鏈烘瀯浠g爜"),
default: false
},
@@ -258,7 +275,7 @@
editClick(val) {
let params = JSON.parse(JSON.stringify(val))
this.titleName = "缂栬緫"
- this.editRow = { ...params, password: "000000" }
+ this.editRow = { ...params, password: "000000",id:params.id?params.id:params.ID, }
this.$refs.add.islook = true
},
// 鍚敤/鍋滅敤
@@ -274,15 +291,18 @@
updateEnterprise(params)
.then((reply) => {
if (reply && reply.code == 200) {
- this.editOutsideUser(row)
- // this.getData();
- // this.$message.success(row.status == 1 ? "鍋滅敤鎴愬姛" : "鍚敤鎴愬姛");
+ if(row.tel){
+ this.editOutsideUser(row)
+ }else{
+ this.getData()
+ this.$message.success(row.status == 1 ? "鍋滅敤鎴愬姛" : "鍚敤鎴愬姛")
+ }
+
} else {
this.$message.error(row.status == 1 ? "鍋滅敤澶辫触" : "鍚敤澶辫触")
}
})
- .catch(() => {})
- })
+ }).catch(() => {})
},
// 鍚敤鍋滅敤澶栭儴鐢ㄦ埛
editOutsideUser(row) {
@@ -304,7 +324,17 @@
// 鑾峰彇鐘舵��
getStatus(val) {
return val == 0 ? "鏂板缓" : val == 1 ? "鍚敤" : val == 2 ? "鍋滅敤" : "--"
- }
+ },
+ shutCreateDown() {
+ this.$refs.create.islook = false;
+ this.getData();
+ },
+ // 鍒涘缓璐﹀彿
+ createAccountClick(row) {
+ let params = JSON.parse(JSON.stringify(row))
+ this.createRow = { ...params,id:row.id?row.id:row.ID };
+ this.$refs.create.islook = true;
+ },
}
}
</script>
--
Gitblit v1.8.0