shish 2 лет назад
Родитель
Сommit
9adbd5d937
4 измененных файлов с 33 добавлено и 6 удалено
  1. 12 1
      ghs/src/mock/userInfo.js
  2. 7 0
      ghs/src/service/ghs/index.js
  3. 13 4
      ghs/src/views/in/ghs.vue
  4. 1 1
      ghs/src/views/item/list.vue

+ 12 - 1
ghs/src/mock/userInfo.js

@@ -146,34 +146,45 @@ let menu = {
 		//注意如果子菜单有多个,父菜单应设置成type=0 !!!!!!!!!!!! shish 2021.3.25
 		{id: '1',parentId: null,name: '首页',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/',viewPath: 'views/home.vue',keepAlive: 1},
         {id: '101',parentId: 1,name: '今日概况',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/console/index',viewPath: 'views/home.vue',keepAlive: 1},
+
 		{id: '2',parentId: null,name: '客户',type: 0,icon: 'iconkehuguanli',orderNum: 2,router: '/member/list',viewPath: 'views/member/list.vue',keepAlive: 1},
         {id: '201',parentId: 2,name: '客户列表',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/list',viewPath: 'views/member/list.vue',keepAlive: 1},
 		{id: '221',parentId: 2,name: '余额明细',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/custom-balance-list',viewPath: 'views/member/custom-balance-list.vue',keepAlive: 1},
+
 		{id: '3',parentId: null,name: '订单',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
         {id: '301',parentId: 3,name: '订单列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
 		{id: '303',parentId: 3,name: '预订汇总',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/book',viewPath: 'views/order/book.vue',keepAlive: 1},
         {id: '302',parentId: 3,name: '开单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/add',viewPath: 'views/order/add.vue',keepAlive: 1},
+
 		{id: '1400',parentId: null,name: '采购',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/list',viewPath: 'views/in/list.vue',keepAlive: 1},
 		{id: '1405',parentId: 1400,name: '采购记录',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/list',viewPath: 'views/in/list.vue',keepAlive: 1},
-		{id: '1410',parentId: 1400,name: '供货商',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
 		{id: '1415',parentId: 1400,name: '新增采购',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/add',viewPath: 'views/in/add.vue',keepAlive: 1},
 		{id: '1420',parentId: 1400,name: '改价入库',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/change',viewPath: 'views/in/change.vue',keepAlive: 1},
+		
+		{id: '15',parentId: null,name: '供货商',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
+		{id: '1505',parentId: 15,name: '商家列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/in/ghs',viewPath: 'views/in/ghs.vue',keepAlive: 1},
+
 		{id: '4',parentId: null,name: '花材',type: 0,icon: 'iconshangpinguanli',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
 		{id: '405',	parentId: '4',name: '花材列表',type: 1,icon: 'icon-user',orderNum: 4,router: '/item/list',viewPath: 'views/item/list.vue',keepAlive: 1},
 		{id: '403',	parentId: '4',name: '批量改价',type: 1,icon: 'icon-user',orderNum: 4,router: '/item/batch-modify',viewPath: 'views/item/batch-modify.vue',keepAlive: 1},
 		{id: '401',parentId: '4',name: '花材分类',type: 1,icon: 'icon-user',orderNum: 4,router: '/item-class/list',viewPath: 'views/item-class/list.vue',keepAlive: 1},
 		{id: '809',parentId: '4',name: '花材导入',type: 1,icon: 'icongongzuotai',orderNum: 4,router: '/item/import',viewPath: 'views/item/import.vue',keepAlive: 1},
+
 		{id: '9',parentId: null,name: '员工',type: 0,icon: 'iconyuangongguanli',orderNum: 9,router: '/staff/list',viewPath: 'views/staff/list.vue',keepAlive: 1},
 		{id: '902',parentId: '9',name: '员工列表',type: 1,icon: 'iconkehuguanli',orderNum: 9,router: '/staff/list',viewPath: 'views/staff/list.vue',keepAlive: 1},
 		{id: '903',parentId: '9',name: '角色列表',type: 1,icon: 'iconkehuguanli',orderNum: 9,router: '/role/list',viewPath: 'views/staff/role-list.vue',keepAlive: 1},
 		{id: '904',	parentId: '9',name: '操作记录',type: 1,icon: 'iconkehuguanli',orderNum: 9,router: '/operate/list',viewPath: 'views/staff/operate.vue',keepAlive: 1},
+
 		{id: '10',parentId: null,name: '门店',type: 1,icon: 'iconguanggao',orderNum: 10,router: '/shop/list',viewPath: 'views/shop/list.vue',keepAlive: 1},
         {id: '1001',parentId: 10,name: '门店列表',type: 1,icon: 'iconguanggao',orderNum: 10,router: '/shop/list',viewPath: 'views/shop/list.vue',keepAlive: 1},
+
 		{id: '11',parentId: null,name: '邀请',type: 1,icon: 'iconyaoqingyouli',orderNum: 11,router: '/pages/admin/my-invite',viewPath: 'views/my-invite/index.vue',keepAlive: 1},
         {id: '1101',parentId: 11,name: '邀请注册',type: 1,icon: 'iconyaoqingyouli',orderNum: 11,router: '/pages/admin/my-invite',viewPath: 'views/my-invite/index.vue',keepAlive: 1},
+
 		{id: '12',parentId: null,name: '资产',type: 0,icon: 'icondingdanguanli',orderNum: 12,router: '/assets/list',viewPath: 'views/assets/list.vue',keepAlive: 1},
 		{id: '1201',parentId: '12',name: '收入明细',type: 1,icon: 'icondingdanguanli',orderNum: 12,router: '/assets/list',viewPath: 'views/assets/list.vue',keepAlive: 1},
 		{id: '1202',parentId: '12',name: '支出明细',type: 1,icon: 'icondingdanguanli',orderNum: 12,router: '/assets/expendList',viewPath: 'views/assets/expendList.vue',keepAlive: 1},
+		
 		{id: '13',parentId: null,name: '设置',type: 0,icon: 'iconshezhi',orderNum: 12,router: '/goods/list',viewPath: 'views/goods/goods-list.vue',keepAlive: 1},
 		{id: '1301',parentId: '13',name: '密码设置',type: 1,icon: 'iconkehuguanli',orderNum: 12,router: '/setting/set-password',viewPath: 'views/setting/set-password.vue',keepAlive: 1}
 	]

+ 7 - 0
ghs/src/service/ghs/index.js

@@ -10,5 +10,12 @@ export class CustomService extends BaseService {
 		});
 	}
 
+	downloadGhs(data) {
+		return this.request({
+		  url: '/download-ghs',
+		  params: data
+		});
+	  }
+
 }
 export default new CustomService();

+ 13 - 4
ghs/src/views/in/ghs.vue

@@ -61,10 +61,14 @@
 				<span>{{ scope.row.buyAmount ? parseFloat(scope.row.buyAmount) : 0 }}</span>
 			</template>
 			
-			<template #slot-billing>
+			<template #slot-add-ghs>
 				<el-button type="primary" size="mini" style="margin-left:60px;" @click="addGhs()">添加供货商</el-button>
 			</template>
 
+			<template #slot-export-ghs>
+				<el-button type="primary" size="mini" style="margin-left:60px;" @click="exportGhs()">导出供货商</el-button>
+			</template>
+
 			<template #table-column-name="{scope}">
 				<el-link
 					:underline="true"
@@ -184,6 +188,13 @@ export default {
 			let query = {}
 			this.$router.push({path:'/in/add',query})
 		},
+		exportGhs(){
+			this.$service.ghs.downloadGhs().then(res => {
+				if(res.file){
+					window.location.href = res.file
+				}
+			})
+		},
 		addGhs(){
 			let query = {}
 			this.$router.push({path:'/in/add',query})			
@@ -280,14 +291,12 @@ export default {
 				})
 				.set('layout', [
 					['slot-tabs'],
-					['search-key','slot-billing'],
+					['search-key','slot-add-ghs','flex1','slot-export-ghs'],
 					['data-table'],
 					['slot-total-debt-amount','flex1', 'pagination']
 				])
 				.on('refresh', async (params, { next }) => {
 					let result = await next(params);
-					this.tabsData[0].val = result.totalUser
-					this.tabsData[1].val = result.mayGatheringNum
 					this.totalDebtAmount = result.totalDebtAmount?result.totalDebtAmount:0
 				})
 				.done();

+ 1 - 1
ghs/src/views/item/list.vue

@@ -385,7 +385,7 @@ export default {
 			if(res.file){
 				window.location.href = res.file
 			}
-		}).catch(err => {})
+		})
 	  },
 	copyProduct(id){
 		this.$message({message: '开发中',type: 'warning'});