优惠移动端楼层装修
							parent
							
								
									744567e8de
								
							
						
					
					
						commit
						c4168c9a2b
					
				|  | @ -101,7 +101,7 @@ | |||
|                 > | ||||
|                 <span | ||||
|                   class="item-desc-pintuan" | ||||
|                   v-if="promotionMap['FULL_DISCOUNT'].fullRate" | ||||
|                   v-if="promotionMap['FULL_DISCOUNT'].fullRate && promotionMap['FULL_DISCOUNT'].fullRateFlag" | ||||
|                   >满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立享{{ | ||||
|                     promotionMap["FULL_DISCOUNT"].fullRate | ||||
|                   }}折</span | ||||
|  |  | |||
|  | @ -287,7 +287,7 @@ export default { | |||
|     }, | ||||
|     filterOrderStatus (status) { // 获取订单状态中文 | ||||
|       const ob = this.orderStatusList.filter(e => { return e.status === status }); | ||||
|       return ob[0].name | ||||
|       return ob && ob[0] ? ob[0].name : status | ||||
|     } | ||||
|   } | ||||
| }; | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ export const getPromotionGoods = (promotionId, params) => { | |||
| 
 | ||||
| // 获取当前进行中的促销活动
 | ||||
| export const getAllPromotion = params => { | ||||
|   return getRequest("/promotion/current", params); | ||||
|   return getRequest("/promotion/promotion/current", params); | ||||
| }; | ||||
| 
 | ||||
| // 获取拼团数据
 | ||||
|  |  | |||
|  | @ -519,6 +519,24 @@ export const modelData = [ | |||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   { | ||||
|     type: "notice", | ||||
|     name: "公告", | ||||
|     img: "md-image", | ||||
|     notAdd: false, | ||||
|     notLink: true, | ||||
|     notImg: true, | ||||
|     options: { | ||||
|       list: [ | ||||
|         { | ||||
|           title: [{context: "这是一条公告"}], | ||||
|           color: "#666", | ||||
|           bk_color: "#FFF", | ||||
|           img: 'http://files.sxcfx.cn/upload/20220318/71e5d27aca82aeedf647052e1e4ceaaa.png' | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   { | ||||
|     type: "promotions", | ||||
|     name: "促销活动", | ||||
|  |  | |||
|  | @ -148,7 +148,9 @@ | |||
|   display: flex; | ||||
| } | ||||
| 
 | ||||
| .decorate-notice {} | ||||
| .decorate-notice { | ||||
|   margin-top: 10px; | ||||
| } | ||||
| 
 | ||||
| .card {} | ||||
| 
 | ||||
|  |  | |||
|  | @ -274,6 +274,11 @@ | |||
|                 class="decorate-notice" | ||||
|               > | ||||
|                 <Input v-model="t.context" style="width: 200px" /> | ||||
|                 <Icon | ||||
|                   @click="removeNotice(tindex)" | ||||
|                   size="16" | ||||
|                   type="md-close-circle" | ||||
|                 /> | ||||
|               </div> | ||||
|             </div> | ||||
|           </div> | ||||
|  | @ -503,6 +508,11 @@ export default { | |||
|       this.selectedGoods = item; | ||||
|       this.picModelFlag = true; | ||||
|     }, | ||||
|     removeNotice(index) { | ||||
|       this.$nextTick(() => { | ||||
|         this.res.options.list[0].title.splice(index, 1); | ||||
|       }); | ||||
|     }, | ||||
|     // 关闭 | ||||
|     closeDecorate(index) { | ||||
|       this.$nextTick(() => { | ||||
|  |  | |||
|  | @ -178,7 +178,7 @@ export default { | |||
|                       color1: val.subColor, | ||||
|                       bk_color: val.subBkColor, | ||||
|                       data: res.result.commodityList | ||||
|                         ? res.result.commodityList | ||||
|                         ? res.result.commodityList.splice(0,2) | ||||
|                         : [], | ||||
|                     }); | ||||
|                   } | ||||
|  | @ -195,7 +195,7 @@ export default { | |||
|             if (res.success && !exist) { | ||||
|               this.contentData.list[newIndex].options.list.push({ | ||||
|                 data: res.result[val.promotionsType] | ||||
|                   ? res.result[val.promotionsType] | ||||
|                   ? res.result[val.promotionsType].splice(0,2) | ||||
|                   : [], | ||||
|                 type: val.promotionsType, | ||||
|                 title1: val.subName, | ||||
|  |  | |||
|  | @ -46,5 +46,4 @@ export default { | |||
|   tpl_ad_list, | ||||
|   promotions: tpl_promotions, | ||||
|   tpl_activity_list, | ||||
|   tpl_adv | ||||
| }; | ||||
|  |  | |||
|  | @ -1,38 +1,39 @@ | |||
| <template> | ||||
|     <div class="layout"> | ||||
|         <div class="menu-list"> | ||||
|             <div class="menu-item" v-for="(item,index) in res.list" :key="index"> | ||||
|                 <div> | ||||
|                     <img class="menu-img" :src="item.img" alt=""> | ||||
|                 </div> | ||||
|                 <div class="menu-title">{{item.title}}</div> | ||||
|             </div> | ||||
|   <div class="layout"> | ||||
|     <div class="menu-list"> | ||||
|       <div class="menu-item" v-for="(item, index) in res.list" :key="index"> | ||||
|         <div> | ||||
|           <img class="menu-img" :src="item.img" alt="" /> | ||||
|         </div> | ||||
|         <div class="menu-title">{{ item.title }}</div> | ||||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
| <script> | ||||
| export default { | ||||
|     props:['res'] | ||||
| } | ||||
|   props: ["res"], | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
|    @import "./tpl.scss"; | ||||
|    .menu-list{ | ||||
|        display: flex; | ||||
|        align-items: center; | ||||
|        flex-wrap: wrap; | ||||
| @import "./tpl.scss"; | ||||
| .menu-list { | ||||
|   display: flex; | ||||
|   align-items: center; | ||||
|   justify-content: space-between; | ||||
|   flex-wrap: wrap; | ||||
| 
 | ||||
|        >.menu-item{ | ||||
|            text-align: center; | ||||
|            width: 20%; | ||||
|            margin:10px 0; | ||||
|        } | ||||
|    } | ||||
|    .menu-img{ | ||||
|        width: 44px; | ||||
|        height: 44px; | ||||
|    } | ||||
|    .menu-title{ | ||||
|        font-size: 12px; | ||||
|    } | ||||
|   > .menu-item { | ||||
|     text-align: center; | ||||
|     width: 20%; | ||||
|     margin: 10px 0; | ||||
|   } | ||||
| } | ||||
| .menu-img { | ||||
|   width: 44px; | ||||
|   height: 44px; | ||||
| } | ||||
| .menu-title { | ||||
|   font-size: 12px; | ||||
| } | ||||
| </style> | ||||
|  |  | |||
|  | @ -53,11 +53,19 @@ | |||
|               <span class="describe">消费达到当前金额可以参与优惠</span> | ||||
|             </FormItem> | ||||
|             <FormItem label="优惠方式"> | ||||
|               <RadioGroup type="button" button-style="solid" v-model="form.discountType"> | ||||
|                 <Radio :disabled="form.promotionStatus != 'NEW'" label="fullMinusFlag" | ||||
|               <RadioGroup | ||||
|                 type="button" | ||||
|                 button-style="solid" | ||||
|                 v-model="form.discountType" | ||||
|               > | ||||
|                 <Radio | ||||
|                   :disabled="form.promotionStatus != 'NEW'" | ||||
|                   label="fullMinusFlag" | ||||
|                   >减现金</Radio | ||||
|                 > | ||||
|                 <Radio :disabled="form.promotionStatus != 'NEW'" label="fullRateFlag" | ||||
|                 <Radio | ||||
|                   :disabled="form.promotionStatus != 'NEW'" | ||||
|                   label="fullRateFlag" | ||||
|                   >打折</Radio | ||||
|                 > | ||||
|               </RadioGroup> | ||||
|  | @ -102,7 +110,9 @@ | |||
|                 v-model="form.couponFlag" | ||||
|                 >送优惠券</Checkbox | ||||
|               > | ||||
|               <Checkbox :disabled="form.promotionStatus != 'NEW'" v-model="form.giftFlag" | ||||
|               <Checkbox | ||||
|                 :disabled="form.promotionStatus != 'NEW'" | ||||
|                 v-model="form.giftFlag" | ||||
|                 >送赠品</Checkbox | ||||
|               > | ||||
|               <Checkbox | ||||
|  | @ -125,9 +135,12 @@ | |||
|                 :loading="couponLoading" | ||||
|                 style="width: 280px" | ||||
|               > | ||||
|                 <Option v-for="item in couponList" :value="item.id" :key="item.id">{{ | ||||
|                   item.couponName | ||||
|                 }}</Option> | ||||
|                 <Option | ||||
|                   v-for="item in couponList" | ||||
|                   :value="item.id" | ||||
|                   :key="item.id" | ||||
|                   >{{ item.couponName }}</Option | ||||
|                 > | ||||
|               </Select> | ||||
|             </FormItem> | ||||
|             <FormItem v-if="form.giftFlag" label="赠品" prop="giftId"> | ||||
|  | @ -140,9 +153,14 @@ | |||
|                 :loading="giftLoading" | ||||
|                 style="width: 280px" | ||||
|               > | ||||
|                 <Option v-for="item in giftList" :value="item.id" :key="item.id">{{ | ||||
|                   item.goodsName | ||||
|                 }}</Option> | ||||
|                 <Option | ||||
|                   v-for="item in giftList" | ||||
|                   :value="item.id" | ||||
|                   :key="item.id" | ||||
|                   > | ||||
|                   {{ item.goodsName }} | ||||
|                   </Option | ||||
|                 > | ||||
|               </Select> | ||||
|             </FormItem> | ||||
|             <FormItem v-if="form.pointFlag" label="赠积分" prop="point"> | ||||
|  | @ -155,17 +173,26 @@ | |||
|               /> | ||||
|             </FormItem> | ||||
|             <FormItem label="使用范围" prop="scopeType"> | ||||
|               <RadioGroup type="button" button-style="solid" v-model="form.scopeType"> | ||||
|               <RadioGroup | ||||
|                 type="button" | ||||
|                 button-style="solid" | ||||
|                 v-model="form.scopeType" | ||||
|               > | ||||
|                 <Radio :disabled="form.promotionStatus != 'NEW'" label="ALL" | ||||
|                   >全品类</Radio | ||||
|                 > | ||||
|                 <Radio :disabled="form.promotionStatus != 'NEW'" label="PORTION_GOODS" | ||||
|                 <Radio | ||||
|                   :disabled="form.promotionStatus != 'NEW'" | ||||
|                   label="PORTION_GOODS" | ||||
|                   >指定商品</Radio | ||||
|                 > | ||||
|               </RadioGroup> | ||||
|             </FormItem> | ||||
| 
 | ||||
|             <FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'"> | ||||
|             <FormItem | ||||
|               style="width: 100%" | ||||
|               v-if="form.scopeType == 'PORTION_GOODS'" | ||||
|             > | ||||
|               <div | ||||
|                 style="display: flex; margin-bottom: 10px" | ||||
|                 v-if="form.promotionStatus == 'NEW'" | ||||
|  | @ -196,7 +223,7 @@ | |||
|                 <template slot-scope="{ index }" slot="action"> | ||||
|                   <Button | ||||
|                     type="error" | ||||
|                     :disabled="form.promotionStatus != 'NEW' && id" | ||||
|                     :disabled="form.promotionStatus != 'NEW' && !!id" | ||||
|                     size="small" | ||||
|                     ghost | ||||
|                     @click="delGoods(index)" | ||||
|  | @ -210,7 +237,7 @@ | |||
|               <Button type="text" @click="closeCurrentPage">返回</Button> | ||||
|               <Button | ||||
|                 type="primary" | ||||
|                 :disabled="form.promotionStatus != 'NEW' && id" | ||||
|                 :disabled="form.promotionStatus != 'NEW' && !!id" | ||||
|                 :loading="submitLoading" | ||||
|                 @click="handleSubmit" | ||||
|                 >提交</Button | ||||
|  | @ -220,7 +247,10 @@ | |||
|         </div> | ||||
|       </Form> | ||||
|     </Card> | ||||
|     <sku-select ref="skuSelect" @selectedGoodsData="selectedGoodsData"></sku-select> | ||||
|     <sku-select | ||||
|       ref="skuSelect" | ||||
|       @selectedGoodsData="selectedGoodsData" | ||||
|     ></sku-select> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -280,7 +310,10 @@ export default { | |||
|         promotionName: [{ required: true, message: "活动名称不能为空" }], | ||||
|         rangeTime: [{ required: true, message: "请选择活动时间" }], | ||||
|         description: [{ required: true, message: "请填写活动描述" }], | ||||
|         price: [{ required: true, message: "请输入面额" }, { validator: checkPrice }], | ||||
|         price: [ | ||||
|           { required: true, message: "请输入面额" }, | ||||
|           { validator: checkPrice }, | ||||
|         ], | ||||
|         consumptionLimit: [{ required: true, validator: checkWeight }], | ||||
|         fullMoney: [{ required: true, validator: checkWeight }], | ||||
|         fullMinus: [ | ||||
|  | @ -318,7 +351,10 @@ export default { | |||
|           key: "price", | ||||
|           minWidth: 40, | ||||
|           render: (h, params) => { | ||||
|             return h("div", this.$options.filters.unitPrice(params.row.price, "¥")); | ||||
|             return h( | ||||
|               "div", | ||||
|               this.$options.filters.unitPrice(params.row.price, "¥") | ||||
|             ); | ||||
|           }, | ||||
|         }, | ||||
|         { | ||||
|  | @ -343,8 +379,8 @@ export default { | |||
|     if (this.id) { | ||||
|       this.getDetail(); | ||||
|     } | ||||
|     this.getCouponList(); | ||||
|     this.getGiftList(); | ||||
|     await this.getCouponList(); | ||||
|     await this.getGiftList(); | ||||
|   }, | ||||
|   methods: { | ||||
|     // 关闭当前页面 | ||||
|  | @ -390,14 +426,19 @@ export default { | |||
|       this.$refs.form.validate((valid) => { | ||||
|         if (valid) { | ||||
|           const params = JSON.parse(JSON.stringify(this.form)); | ||||
|           const strat = this.$options.filters.unixToDate(this.form.rangeTime[0] / 1000); | ||||
|           const end = this.$options.filters.unixToDate(this.form.rangeTime[1] / 1000); | ||||
|           const strat = this.$options.filters.unixToDate( | ||||
|             this.form.rangeTime[0] / 1000 | ||||
|           ); | ||||
|           const end = this.$options.filters.unixToDate( | ||||
|             this.form.rangeTime[1] / 1000 | ||||
|           ); | ||||
|           params.startTime = strat; | ||||
|           params.endTime = end; | ||||
| 
 | ||||
|           if ( | ||||
|             params.scopeType == "PORTION_GOODS" && | ||||
|             (!params.promotionGoodsList || params.promotionGoodsList.length == 0) | ||||
|             (!params.promotionGoodsList || | ||||
|               params.promotionGoodsList.length == 0) | ||||
|           ) { | ||||
|             this.$Modal.warning({ title: "提示", content: "请选择指定商品" }); | ||||
|             return; | ||||
|  | @ -463,9 +504,11 @@ export default { | |||
|           this.selectedGoods.forEach(function (e) { | ||||
|             ids.push(e.id); | ||||
|           }); | ||||
|           this.form.promotionGoodsList = this.form.promotionGoodsList.filter((item) => { | ||||
|             return !ids.includes(item.id); | ||||
|           }); | ||||
|           this.form.promotionGoodsList = this.form.promotionGoodsList.filter( | ||||
|             (item) => { | ||||
|               return !ids.includes(item.id); | ||||
|             } | ||||
|           ); | ||||
|         }, | ||||
|       }); | ||||
|     }, | ||||
|  | @ -511,7 +554,10 @@ export default { | |||
|       let params = { | ||||
|         pageSize: 10, | ||||
|         pageNumber: 1, | ||||
|         goodsName: query, | ||||
|         id: query === this.form.giftId ? this.form.giftId : null, | ||||
|         goodsName: query === this.form.giftId ? null : query, | ||||
|         marketEnable: "UPPER", | ||||
|         authFlag: "PASS" | ||||
|       }; | ||||
|       this.giftLoading = true; | ||||
|       getGoodsSkuListDataSeller(params).then((res) => { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue