shish 1 год назад
Родитель
Сommit
db8e06078c

+ 16 - 5
ghsApp/src/admin/staff/list.vue

@@ -22,9 +22,10 @@
 							<div class="list-det-left">
 								<div>
 									<span class="staff-name">{{ item.name }}</span>
-									<span> {{ item.id }}</span>
 								</div>
-								<div>{{ item.mobile }}</div>
+								<div>
+									{{ item.mobile }} <text style="margin-left:15upx;" @click.stop="setSuper(item)">{{ item.id }} - {{ item.adminId }}</text>
+								</div>
 								<div class="flex-center">
 									<div class="status-list">
 										<i class="iconfont icondagou" :class="[item.remind == 1 ? 'app-color-1' : '' ]"></i>
@@ -119,7 +120,7 @@ import ModalModule from '@/components/plugin/modal'
 import AppSearchModule from "@/components/module/app-search";
 import { list } from '@/mixins'
 import { mapGetters } from "vuex"
-import { getStaffList, delStaff, getRoleList, addRole, updateRole, delRole, getLogList } from '@/api/staff'
+import { getStaffList, delStaff, getRoleList, addRole, updateRole, delRole, getLogList,setManager } from '@/api/staff'
 export default {
 	name: 'list',
 	components: {
@@ -181,6 +182,17 @@ export default {
 		}
 	},
 	methods: {
+		setSuper(item){
+			this.$util.confirmModal({content:'确认操作?'},() => {
+				setManager({id:item.id}).then(res=>{
+					if(res.code == 1){
+						this.$msg(res.msg)
+						this.resetList()
+						this.getStaffList()
+					}
+				})
+			})
+		},
 		async init() {
 			this.getStaffList()
 		},
@@ -330,7 +342,7 @@ export default {
 					overflow: hidden;
 					text-overflow:ellipsis;
 					white-space: nowrap;
-					width:180upx;
+					width:220upx;
 				}
 				.super-class{
 					background-color: #3385FF;
@@ -354,7 +366,6 @@ export default {
 						margin-left: 0;
 					}
 					.iconfont {
-						// color: $fontColor3;
 						font-size: 24upx;
 						margin-right: 10upx;
 					}

+ 4 - 0
ghsApp/src/api/staff/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const setManager = data => {
+	return https.get('/shop-admin/set-manager', data)
+}
+
 /** *
  * 员工列表 b
  */

+ 22 - 5
hdApp/src/admin/staff/list.vue

@@ -12,12 +12,14 @@
 							<div class="list-det-left">
 								<div>
 									<span class="staff-name">{{ item.name }}</span>
-									<span>{{ item.mobile }}</span>
+								</div>
+								<div>
+									{{ item.mobile }} <text style="margin-left:15upx;" @click.stop="setSuper(item)">{{ item.id }} - {{ item.adminId }}</text>
 								</div>
 								<div class="flex-center">
 									<div class="status-list">
 										<i class="iconfont icondagou" :class="[item.remind == 1 ? 'app-color-1' : '' ]"></i>
-										<span :class="[item.remind == 1 ? 'app-color-1' : 'app-color-3' ]">收款通知</span>
+										<span :class="[item.remind == 1 ? 'app-color-1' : 'app-color-3' ]">新订单通知</span>
 									</div>
 
 									<div class="status-list">
@@ -115,7 +117,7 @@ import AppWrapperEmpty from '@/components/app-wrapper-empty'
 import ModalModule from '@/components/plugin/modal'
 import { list } from '@/mixins'
 import { mapGetters } from "vuex"
-import { getStaffList, delStaff, getRoleList, addRole, updateRole, delRole, getLogList } from '@/api/staff'
+import { getStaffList, delStaff, getRoleList, addRole, updateRole, delRole, getLogList,setManager } from '@/api/staff'
 export default {
 	name: 'list',
 	components: {
@@ -167,6 +169,17 @@ export default {
 	},
 	onLoad: function() {},
 	methods: {
+		setSuper(item){
+			this.$util.confirmModal({content:'确认操作?'},() => {
+				setManager({id:item.id}).then(res=>{
+					if(res.code == 1){
+						this.$msg(res.msg)
+						this.resetList()
+						this.getStaffList()
+					}
+				})
+			})
+		},
 		async init() {
 			this.getStaffList()
 		},
@@ -278,9 +291,14 @@ export default {
 				position:relative;
 				.staff-name {
 					color: #333;
-					font-size: 30upx;
+					font-size:30upx;
 					font-weight: 600;
 					margin-right: 10upx;
+					display: inline-block;
+					overflow: hidden;
+					text-overflow:ellipsis;
+					white-space: nowrap;
+					width:220upx;
 				}
 				.super-class{
 					background-color: #3385FF;
@@ -304,7 +322,6 @@ export default {
 						margin-left: 0;
 					}
 					.iconfont {
-						// color: $fontColor3;
 						font-size: 24upx;
 						margin-right: 10upx;
 					}

+ 4 - 0
hdApp/src/api/shop-admin/index.js

@@ -4,6 +4,10 @@ export const closeRemindChange = data => {
 	return https.post('/shop-admin/close-remind-change', data)
 }
 
+export const setManager = data => {
+	return https.get('/shop-admin/set-manager', data)
+}
+
 /** *
  * 准备创建管理员的数据
  */

+ 5 - 1
hdApp/src/api/staff/index.js

@@ -1,7 +1,11 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const setManager = data => {
+	return https.get('/shop-admin/set-manager', data)
+}
+
 /** *
- * 员工列表 b
+ * 员工列表
  */
 export const getStaffList = data => {
 	return https.get('/shop-admin/list', data)