| 
					
				 | 
			
			
				@@ -177,6 +177,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import CommAdd from '@/views/commodity/commoditySystem/addCommodity.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { getBtnList, getToken, getShopId } from '@/utils/auth' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { uploadUrl } from '@/utils/request' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { getAllPlatformVoucher } from '@/api/voucherManagement/voucherOperation' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   getClassifyGetAll, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   getClassifyDelete, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -241,17 +242,28 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  created() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    getVoucher().then((res) => { // 获取可选的代金券,用于创建和修改商品时定义代金券的使用规则 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.voucherList = Array.isArray(res.data) ? res.data : typeof res.data === 'number' && res.data ? [ { id: res.data, voucherName: res.data } ] : [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.voucherList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        voucherName: '不使用代金券', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        updateTime: '123123123123', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ratio: 'xxx', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        enabled: '666', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        id: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        desc: '不支持代金券' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  async created() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // getVoucher().then((res) => { // 获取可选的代金券,用于创建和修改商品时定义代金券的使用规则 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   this.voucherList = Array.isArray(res.data) ? res.data : typeof res.data === 'number' && res.data ? [ { id: res.data, voucherName: res.data } ] : [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   this.voucherList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     voucherName: '不使用代金券', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     updateTime: '123123123123', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     ratio: 'xxx', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     enabled: '666', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     id: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     desc: '不支持代金券' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //   }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const res = await getAllPlatformVoucher({ page: 1, pageSize: 9999 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.voucherList = res.data.list.map((item) => ({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      voucherName: item.voucherName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      id: item.platformVoucherId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      desc: item.desc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    })) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.voucherList.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      voucherName: '不使用代金券', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      id: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      desc: '不支持代金券' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mounted() { 
			 |