ソースを参照

修改上传资质

付晓文。 2 ヶ月 前
コミット
6bc06c0be0
1 ファイル変更23 行追加14 行削除
  1. 23 14
      pages/store/businessQua.vue

+ 23 - 14
pages/store/businessQua.vue

@@ -97,7 +97,6 @@
 
 		data() {
 			return {
-				specialImg: '',
 				form: {},
 				treeData: [],
 				isSelectType: false,
@@ -249,8 +248,18 @@
 				const categoryIds = categoryId.split(',').filter(Boolean)
 				const qualificationNameListDTOS = this.qualificationNameMap.map((item, index) => ({
 					...item,
-					categoryId: item.categoryId || categoryIds[index] || categoryId
+					categoryId: item.categoryId || categoryIds[index] || categoryId,
+					qualificationNameCategoryDTOS: (item.qualificationNameCategoryDTOS || []).map((row) => ({
+						...row,
+						special: row.special || ''
+					}))
 				}))
+				const specialList = []
+				this.qualificationNameMap.forEach((item) => {
+					item.qualificationNameCategoryDTOS?.forEach((row) => {
+						if (row.special) specialList.push(row.special)
+					})
+				})
 				let data = {
 					merchantId: uni.getStorageSync(USER_INFO).merchantId,
 					merchantUserId: this.form.merchantUserId,
@@ -258,15 +267,15 @@
 					categoryId,
 					qualificationNameListDTOS,
 					source: 1,
+					special: specialList.join(','),
 				};
-				
-
-				// if (hasEmptyImage) {
-				// 	uni.showToast({
-				// 		icon: 'none',
-				// 		title: '请上传全部图片'
-				// 	})
-				// } else {
+
+				if (hasEmptyImage) {
+					uni.showToast({
+						icon: 'none',
+						title: '请上传全部图片'
+					})
+				} else {
 					if (this.form.specialStatus == null) {
 						this.$http.post('/merchant/localMerchantSpecial/add', data).then(res => {
 							if (res.data.success) {
@@ -306,10 +315,10 @@
 							}
 						})
 					}
-					// this.$http.post('/merchant/examine/new/special/check', data).then((res) => {
-					// 	// this.getDetail();
-					// });
-				// }
+					this.$http.post('/merchant/examine/new/special/check', data).then((res) => {
+						// this.getDetail();
+					});
+				}
 
 				// let data = {
 				// 	merchantId: uni.getStorageSync(USER_INFO).merchantId,