Эх сурвалжийг харах

配置售后服务动态路由

jingshuyong 11 сар өмнө
parent
commit
e13d988eb7

+ 4 - 36
pages/index/index.vue

@@ -422,41 +422,7 @@
 				treeList: [],
 				saleManageList: [],
 				// 售后服务
-				serviceList: [{
-						name: '售后需求',
-						url: `/pages/salesServiceManagement/demandList/index`,
-						path: '/pages/salesServiceManagement/demandList/index',
-						icon: 'icon-gongdanguanli',
-						badge: 0
-					},
-					{
-						name: '售后工单',
-						url: `/pages/salesServiceManagement/workOrder/index`,
-						path: '/pages/salesServiceManagement/workOrder/index',
-						icon: 'icon-gongdanguanli',
-						badge: 0
-					},
-					{
-						name: '配件申请记录',
-						url: `/pages/salesServiceManagement/accessory/index`,
-						path: '/pages/salesServiceManagement/accessory/index',
-						icon: 'icon-gongdanguanli',
-						badge: 0
-					},
-					{
-						name: '配件回收记录',
-						url: `/pages/salesServiceManagement/recycle/index`,
-						path: '/pages/salesServiceManagement/recycle/index',
-						icon: 'icon-gongdanguanli',
-						badge: 0
-					},
-					// {
-					// 	name: '发货确认单',
-					// 	url: `/pages/invoiceConfirm/index`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// }
-				]
+				serviceList: []
 			}
 		},
 		created() {
@@ -488,6 +454,7 @@
 				console.log('-----------list--------------')
 				console.log(list)
 				if (list[0] && list[0].children.length > 0) {
+					console.log(list[0].children, 'list[0].children ----')
 					list[0].children.forEach(f => {
 						if (f.path == 'productionManage') {
 							this.productionList = f.children
@@ -515,8 +482,9 @@
 							console.log(f, 'f')
 							this.internalManagementList = f.children
 
+						} else if (f.path == 'serviceList') {
+							this.serviceList = f.children;
 						}
-
 					})
 				}
 			},

+ 4 - 3
pages/salesServiceManagement/accessory/accessoryAdd.vue

@@ -198,6 +198,10 @@
 				console.log(this.form, 'form')
 			},
 			save() {
+				uni.redirectTo({
+					url: '/pages/salesServiceManagement/accessory/index'
+				});
+				return
 				if (!this.form.name) {
 					this.$refs.uToast.show({
 						type: "warning",
@@ -238,9 +242,6 @@
 						type: "success",
 						message: "操作成功",
 					})
-					uni.redirectTo({
-						url: '/pages/login/login'
-					});
 				}).catch((err) => {
 					console.log(err, 'err --')
 				})

+ 3 - 0
pages/salesServiceManagement/accessory/index.vue

@@ -152,6 +152,9 @@
 			}
 		},
 		created() {
+			
+		},
+		onShow() {
 			this.doSearch();
 		},
 		methods: {

+ 5 - 4
pages/salesServiceManagement/workOrder/components/editPlan.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="">
 		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back"
-			:title="title" @clickLeft="backAdd">
+			:title="title" @clickLeft="back">
 		</uni-nav-bar>
 		<view class="scrollable-tabs" ref="tabsContainer">
 			<u-subsection :list="tabs" :current="currentIndex" @change="(e)=>sectionChange(e)"></u-subsection>
@@ -22,7 +22,7 @@
 		<!-- 报工信息 -->
 		<ReportInfo ref="reportInfoRef" :form="reportForm" v-show="currentValue == 1" />
 		<view :class=" type == 'report' ? 'footerButton footer_button':'footerButton'" v-if="isDisable">
-			<u-button type="default" text="返回" @click="backAdd"></u-button>
+			<u-button type="default" text="返回" @click="back"></u-button>
 			<u-button type="primary" text="报工" v-if="type == 'report'" @click="save('report')"></u-button>
 			<u-button type="primary" @click="save" text="保存"></u-button>
 		</view>
@@ -333,14 +333,15 @@
 						message: "操作成功",
 					})
 					uni.hideLoading();
-					this.backAdd();
+					this.back();
 				}).catch(e => {
 					uni.hideLoading();
 				})
 			},
 			//返回添加页
 			backAdd() {
-				uni.navigateBack();
+				this.back();
+				// uni.navigateBack();
 			},
 			// confirm(data, name) {
 			// 	this.form.executeGroupName = name

+ 3 - 0
pages/salesServiceManagement/workOrder/index.vue

@@ -299,6 +299,9 @@
 		},
 		computed: {},
 		onLoad() {
+			
+		},
+		onShow() {
 			this.doSearch();
 		},
 		created() {